问题描述
尝试通过pip安装pygame时出现以下错误:
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.
推荐答案
更新: Pygame 1.9.4 已发布,您可以下载并安装一个>再次与点.在Windows中,建议使用以下命令安装它:py -3.7 -m pip install pygame
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
尚无适用于Python 3.7的官方预编译pygame软件包,因此pip install pygame
不起作用,但您可以从以下网站获得pygame滚轮:"> https://www.lfd.uci.edu/~gohlke/pythonlibs/#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
如果您使用的是64位Python版本,请下载pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl
;如果您使用的是32位版本,请下载pygame‑1.9.3‑cp37‑cp37m‑win32.whl
.然后打开命令行,导航到包含wheel文件的目录并使用pip安装它:
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
此解决方案仅在Windows中有效,因此具有其他操作系统的用户必须等待并使用Python 3.6.
This solution works only in Windows, so users with other operating systems have to wait and use Python 3.6.
这篇关于无法使用适用于Python 3.7的pip安装pygame-命令"python setup.py egg_info"失败,错误代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!