使用pip install安装pygame时遇到问题 [英] Trouble installing pygame using pip install
问题描述
我尝试过:c:/python34/scripts/pip install http://bitbucket.org/pygame/pygame
并收到此错误:
Cannot unpack file C:\Users\Marius\AppData\Local\Temp\pip-b60d5tho-unpack\pygame
(downloaded from C:\Users\Marius\AppData\Local\Temp\pip-rqmpq4tz-build, conte
nt-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of C:\Users\Marius\AppData\Local\Temp\pip-rqmp
q4tz-build
如果有人有任何解决方案,请随时与他们分享!
我也试过了
pip install --allow-unverified
,但这也给了我一个错误.
Please if anyone have any solutions please feel free to share them!
I also tried
pip install --allow-unverified
, but that gave me an error as well.
推荐答案
这是唯一适用于我的方法.
This is the only method that works for me.
pip install pygame==1.9.1release --allow-external pygame --allow-unverified pygame
-
这些是引导我执行此命令的步骤(我放了它们以便人们容易找到):
These are the steps that lead me to this command (I put them so people finds it easily):
$ pip install pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
No distributions at all found for pygame
然后,建议我允许外部:
Then, as suggestes I allow external:
$ pip install pygame --allow-external pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some insecure and unverifiable files were ignored (use --allow-unverified pygame to allow).
No distributions at all found for pygame
因此,我也允许无法验证的内容:
So I also allow unverifiable:
$ pip install pygame --allow-external pygame --allow-unverified pygame
Collecting pygame
pygame is potentially insecure and unverifiable.
HTTP error 400 while getting http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
Could not install requirement pygame because of error 400 Client Error: Bad Request
Could not install requirement pygame because of HTTP error 400 Client Error: Bad Request for URL http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
因此,在访问 http://www.pygame.org/download.shtml,我考虑添加版本号(1.9.1release是当前稳定的版本).
So, after a visit to http://www.pygame.org/download.shtml, I thought about adding the version number (1.9.1release is the currently stable one).
-
希望有帮助.
这篇关于使用pip install安装pygame时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!