【问题标题】:Can't download pygame with pip on windows无法在 Windows 上使用 pip 下载 pygame
【发布时间】:2018-12-26 20:15:42
【问题描述】:

尝试下载 pygame 时遇到此问题。我如何用pip下载它?我使用 64 位 Windows 10 w/python 3.7...谢谢

C:\Users\Antoine>python -m pip install -U pygame --user
Collecting pygame
  Using cached https://files.pythonhosted.org/packages/61/06/3c25051549c252cc6fde01c8aeae90b96831370884504fe428a623316def/pygame-1.9.3.tar.gz
Complete output from command python setup.py egg_info:


WARNING, No "Setup" File Exists, Running "config.py"
Using WINDOWS configuration...

Path for SDL not found.
Too bad that is a requirement! Hand-fix the "Setup"
Path for FONT not found.
Path for IMAGE not found.
Path for MIXER not found.
Path for PNG not found.
Path for JPEG not found.
Path for PORTMIDI not found.
Path for COPYLIB_tiff not found.
Path for COPYLIB_z not found.
Path for COPYLIB_vorbis not found.
Path for COPYLIB_ogg not found.

If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.


Continuing With "setup.py"
Error with the "Setup" file,
perhaps make a clean copy from "Setup.in".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Antoine\AppData\Local\Temp\pip-install-0c2lpkkq\pygame\setup.py", line 165, in <module>
    extensions = read_setup_file('Setup')
  File "C:\Python\Python37\lib\distutils\extension.py", line 171, in read_setup_file
    line = expand_makefile_vars(line, vars)
  File "C:\Python\Python37\lib\distutils\sysconfig.py", line 407, in expand_makefile_vars
    s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: can only concatenate str (not "NoneType") to str

【问题讨论】:

标签: python python-3.x pip pygame


【解决方案1】:

Pygame 无法在 3.7 中正确安装。改为安装 3.6.6。我有同样的问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-09
    • 2020-02-17
    相关资源
    最近更新 更多