使用 pip install 安装 pygame 时遇到问题 [英] Trouble installing pygame using pip install

查看:41
本文介绍了使用 pip install 安装 pygame 时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过:c:/python34/scripts/pip install http://bitbucket.org/pygame/pygame

并收到此错误:

Cannot unpack file C:UsersMariusAppDataLocalTemppip-b60d5tho-unpackpygame 
(downloaded from C:UsersMariusAppDataLocalTemppip-rqmpq4tz-build, conte
nt-type: text/html; charset=utf-8); cannot detect archive format
  Cannot determine archive format of C:UsersMariusAppDataLocalTemppip-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屋!

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