我想使用pip for python2.7在msys2上安装pygame 1.9.6。问题是当我尝试使用“ pip install pygame”安装它时出现错误。
这是错误:
Processing d:/msys64/home/desolaser/pygame-1.9.6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:/users/desola~1/appdata/local/temp/pip-req-build-tn9xwt/setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "buildconfig/config.py", line 210, in main
deps = CFG.main(**kwds)
File "buildconfig/config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "buildconfig/download_win_prebuilt.py", line 303, in ask
'\nDownload prebuilts to "%s" and copy to %s? [Y/n]' % (download_dir, dest_str))
EOFError: EOF when reading a line
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:/users/desola~1/appdata/local/temp/pip-req-build-tn9xwt/
我尝试在Python3中使用“ pip3 install pygame”执行相同操作,但出现相同的错误。 可以在msys2上安装pygame吗?
答案 0 :(得分:0)
我也有这个错误。您可以从wheel文件安装它。
首先使用pip将wheel安装到python中。
pip安装轮
转到此页 https://pypi.org/project/pygame/#files 要么 https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
他们已经为pygame构建了32和64位的wheel文件,具体取决于您安装的python类型。因此,对于Windows上的32位python版本3.7,您可以下载 pygame-1.9.6-cp37-cp37-win32.whl
然后安装滚轮文件
pip安装C:/some-dir/pygame-1.9.6-cp37-cp37-win32.whl