Can't install pygame with pip for Python 3.7 -

2019-01-15 22:21发布

I get the below error when trying to install pygame with pip:

Command "python setup.py egg_info" failed with error code 1 in 
C:\Users\danie\AppData\Local\Temp\pip-install-8zxzuqef\pygame\

I don't know what this means, and when i look up in other places to tells me to fix my environment variables. But it still doesn't work.

2条回答
一纸荒年 Trace。
2楼-- · 2019-01-15 22:44

Update: Pygame 1.9.4 has been released and you can download and install it with pip again. In Windows I recommend installing it with: py -3.7 -m pip install pygame


There are no official precompiled pygame packages for Python 3.7 available yet, so pip install pygame doesn't work, but you can get a pygame wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl if you have a 64-bit Python version or pygame‑1.9.3‑cp37‑cp37m‑win32.whl if you have a 32-bit version. Then open the command-line, navigate to the directory that contains the wheel file and install it with pip:

py -3.7 -m pip install pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl

This solution works only in Windows, so users with other operating systems have to wait and use Python 3.6.

查看更多
Fickle 薄情
3楼-- · 2019-01-15 23:09

Try :

pip install --upgrade setuptools
查看更多
登录 后发表回答