【发布时间】: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?
-
他说他使用的是 3.7,它在回溯中。
-
pip install setuptools然后再试一次 -
@nosklo 谢谢我已经安装了安装工具 (40.0.0)。
标签: python python-3.x pip pygame