Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在Python 3.4上安装64位Pygame_Python_Python 3.x_Pygame_Pip_Python Wheel - Fatal编程技术网

无法在Python 3.4上安装64位Pygame

无法在Python 3.4上安装64位Pygame,python,python-3.x,pygame,pip,python-wheel,Python,Python 3.x,Pygame,Pip,Python Wheel,我已经安装了64位python 3.4,它随pip一起提供。我想安装pygame,我知道他们网站上的32位版本与我的python版本不兼容。因此,我从(pygame-1.9.2a0-cp34-none-win\u amd64.whl)下载了64位python 3.4 pygame包。我将包重命名为pygame.whl,并试图在命令行上使用pip安装它,但它给了我这个错误 Collecting pygame Could not find a version that satisfies the r

我已经安装了64位python 3.4,它随pip一起提供。我想安装pygame,我知道他们网站上的32位版本与我的python版本不兼容。因此,我从(pygame-1.9.2a0-cp34-none-win\u amd64.whl)下载了64位python 3.4 pygame包。我将包重命名为
pygame.whl
,并试图在命令行上使用pip安装它,但它给了我这个错误

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

因此,我尝试使用
--allow external
选项,但它给了我一个不同的错误,并要求我提供一个需求文件。我环顾四周,发现我可能需要尝试使用
--pre
选项,但不管怎样,它给了我与上面完全相同的错误。如何安装软件包?

您未能安装
.whl
软件包的最可能原因是您键入了

pip install pygame
在命令提示下,不要切换到存储重命名的
pygame.whl
并运行的目录

pip install pygame.whl
pip
要求您提供所安装文件的全名

您收到的错误消息表明您运行了第一个命令,
pip
正在PyPI中查找
pygame
(不在那里)。
--allow external
命令允许您指定一个可以找到源文件或
.whl
文件的远程位置


将来,我建议不要重命名从链接到的(非常优秀)站点下载的文件,这样当您尝试安装它们时,您就可以确保运行了正确的命令。请记住,您始终可以使用Tab键在命令行上填写文件名。

您使用的是什么操作系统?我使用的是Windows 8.1,请看这里我在上面的帖子中已经说过,pygame的32位版本不能与64位python一起使用。我以前试过。你是如何安装.whl的?谢谢,我最后重新下载了文件并运行了这个命令<代码>pip安装“下载\pygame-1.9.2a0-cp34-none-win\u amd64.whl”。它工作得很好。