无法使用 Python 3.7 的 pip 安装 pygame - 命令“python setup.py egg_info"失败,错误代码 1 [英] Can't install pygame with pip for Python 3.7 - Command "python setup.py egg_info" failed with error code 1

查看:22
本文介绍了无法使用 Python 3.7 的 pip 安装 pygame - 命令“python setup.py egg_info"失败,错误代码 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 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:UsersdanieAppDataLocalTemppip-install-8zxzuqefpygame

我不知道这是什么意思,当我在其他地方查找时告诉我修复我的环境变量.但是还是不行.

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 已经发布,您可以下载安装a> 再次使用 pip.在 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

下载 pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl 如果您有 64 位 Python 版本或 pygame‑1.9.3‑cp37‑cp37m‑win32.whl 如果您有 32 位版本.然后打开命令行,导航到包含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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆