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;
我安装了64位python 3.4,附带了pip。我想安装pygame,我知道他们网站上的32位版本与我的python版本不兼容。因此,我从这里下载了64位python 3.4 pygame包(pygame - 1.9.2a0 - cp34 - none - win_amd64.whl)。我把这个包重新命名为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
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?
所以我尝试使用-allow-external选项,但它给了我一个不同的错误,并要求我提供一个需求文件。我环顾四周,发现我可能需要尝试使用——pre - option,但它给了我和上面一样的错误。我如何安装这个包裹?
1 个解决方案
#1
0
The most likely reason you failed to install the .whl
package is that you typed
您没有安装.whl包的最有可能的原因是您输入了。
pip install pygame
at the command prompt, instead of switching to the directory where you stored your renamed pygame.whl
and running
在命令提示符下,而不是切换到存储您重命名的pygame的目录。whl和运行
pip install pygame.whl
pip
requires that you give the full name of the file being installed.
pip要求您提供正在安装的文件的全名。
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.
您得到的错误消息表明您运行了第一个命令,而pip则在PyPI中查找pygame(它不在那里)。允许外部命令允许您指定一个远程位置,其中可以找到源文件或.whl文件。
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.
在将来,我建议不要重命名从你链接的(相当优秀的)站点下载的文件,这样当你尝试安装它们时,你确定你运行的是正确的命令。记住,您可以始终使用选项卡在命令行上完成文件名。
#1
0
The most likely reason you failed to install the .whl
package is that you typed
您没有安装.whl包的最有可能的原因是您输入了。
pip install pygame
at the command prompt, instead of switching to the directory where you stored your renamed pygame.whl
and running
在命令提示符下,而不是切换到存储您重命名的pygame的目录。whl和运行
pip install pygame.whl
pip
requires that you give the full name of the file being installed.
pip要求您提供正在安装的文件的全名。
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.
您得到的错误消息表明您运行了第一个命令,而pip则在PyPI中查找pygame(它不在那里)。允许外部命令允许您指定一个远程位置,其中可以找到源文件或.whl文件。
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.
在将来,我建议不要重命名从你链接的(相当优秀的)站点下载的文件,这样当你尝试安装它们时,你确定你运行的是正确的命令。记住,您可以始终使用选项卡在命令行上完成文件名。