无法在Windows上使用Pip下载pygame

时间:2018-07-18 19:50:09

标签: python python-3.x pip pygame

请继续尝试下载pygame的问题。如何使用pip下载它?我使用带有python 3.7的64位Windows 10 ...谢谢

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

1 个答案:

答案 0 :(得分:0)

Pygame在3.7中无法正确安装。安装3.6.6代替。我遇到了同样的问题