使用pip安装pygame:命令" python setup.py egg_info"失败,错误代码为1 [英] Installing pygame with pip: Command "python setup.py egg_info" failed with error code 1

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

问题描述

我直到最近才开始学习python编程.目前,我正在尝试安装pygame,但我一直在不断遇到相同的错误:

I have only recently started to learn programming with python. Currently I am trying to install pygame but I am constantly gettting the same error:

C:\WINDOWS\system32>python -m pip install pygame
Collecting pygame
Using cached pygame-1.9.2.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\filip\appdata\local\temp\pip-build-0xsf1b\pygame\setup.py", line 165, in <module>
    extensions = read_setup_file('Setup')
  File "C:\Python33\lib\distutils\extension.py", line 164, in read_setup_file
    line = expand_makefile_vars(line, vars)
  File "C:\Python33\lib\distutils\sysconfig.py", line 430, in expand_makefile_vars
    s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: Can't convert 'NoneType' object to str implicitly

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\filip\appdata\local\temp\pip-build-0xsf1b\pygame\

我已经看过很多有类似问题的帖子,但是没有一个是完全相同的问题,并且/或者他们关心的是不同的程序包和操作系统.而且,我尝试了一些解决方案来解决这些问题,但对我没有任何帮助(我尝试升级pip,使用easy_install和其他一些选项安装,不幸的是,我现在甚至无法回忆起……).

I already went through a number of posts with similar problems but none of them had the exactly same issue, and/or they were concerned with different packages and operating systems. Moreover, I tried a couple of solutions to those problems but nothing worked for me (i tried upgrading pip, installing with easy_install and some other options I, unfortunately, cannot even recall at this point...).

如果有人可以帮助我解决这个问题,我将不胜感激.我知道这可能是一个不相关的问题或新手"问题,但是老实说,我自己尝试过寻找解决方案,但实际上没有任何线索可以做.我也从未真正地接受过计算机科学方面的教育,因此所有这些使我感到沮丧和困惑,并不断妨碍学习过程(这很难).

I would be sincerely grateful if someone can help me with this problem. I am aware that it is possibly an irrelevant or "newbie" question, but I honestly tried finding a solution on my own and really have no more clue what to do. I have also never been really educated in computer science, so all of these things frustrate and confuse the hell out of me and constantly get in the way of the learning process (which is hard enough).

我正在使用Windows 10,python 3.3 64位.

I am using Windows 10, python 3.3 64-bit.

谢谢!

推荐答案

另一种安装pygame的方法,对我有用(W10 64bit,Python 3.4.5).

Another way to install pygame, which worked for me (W10 64bit, Python 3.4.5).

此处下载并为您的版本下载正确的pygame wheel文件.然后,从cmd转到文件所在的目录,然后键入pip install [COMPLETE EXACT FILENAME].

祝你好运!

这篇关于使用pip安装pygame:命令&quot; python setup.py egg_info&quot;失败,错误代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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