python3.4.4安装pygame,无法在Python 3.4上安装64位Pygame

I have 64-bit python 3.4 installed, which comes with pip. I wanted to install pygame, and I know that the 32 bit version that they have on their site wouldn't work with my version of python. So I downloaded the 64-bit python 3.4 pygame package from here (pygame‑1.9.2a0‑cp34‑none‑win_amd64.whl). I renamed the package to pygame.whl and tried to use pip on the command line to install it, but it gave me this error;

Collecting pygame

Could not find a version that satisfies the requirement pygame (from versions:

)

Some externally hosted files were ignored as access to them may be unreliable

(use --allow-external pygame to allow).

No matching distribution found for pygame

So I tried using the --allow-external option, but it gave me a different error and asked me to provide a requirements file. I looked around, and found that I might need to try using the --pre option, but it gave me the exact same error as above regardless. How can I install the package?

解决方案

The most likely reason you failed to install the .whl package is that you typed

pip install pygame

at the command prompt, instead of switching to the directory where you stored your renamed pygame.whl and running

pip install pygame.whl

pip requires that you give the full name of the file being installed.

The error message you got indicates that you ran the first command, and pip was looking in PyPI for pygame (which isn't there). The --allow-external command would have allowed you to specify a remote location where a source file or .whl file could be found.

In the future, I'd recommand not renaming the files downloaded from the (quite excellent) site you linked to, so that when you try to install them you're sure you're running the right command. Remember, you can always use Tab to complete file names on the command line.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值