无法从转盘格式安装numpy [英] Cannot install numpy from wheel format
问题描述
我正在尝试从whl文件安装numpy.我收到错误消息:
I am trying to install numpy from whl file. I get the error:
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
详细信息: Windows 8.1 pro x64,提升的命令提示符
Details: Windows 8.1 pro x64, elevated command prompt
Python 3.4.2
Python 3.4.2
numpy软件包
package numpy from Gohlke's site
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl复制到pip.exe文件夹中
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl copied in the pip.exe folder
日志文件显示:
d:\ Program Files \ WinPython-64bit-3.4.2.4 \ python-3.4.2.amd64 \ Scripts \ pip运行于01/23/15 11:55:21 numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl在此平台上不受支持. 异常信息: 追溯(最近一次通话): 主文件中的文件"D:\ Python34 \ lib \ site-packages \ pip \ basecommand.py",第122行 状态= self.run(选项,参数) 运行中的文件"D:\ Python34 \ lib \ site-packages \ pip \ commands \ install.py",第257行 InstallRequirement.from_line(名称,无) 文件"D:\ Python34 \ lib \ site-packages \ pip \ req.py",第167行,位于from_line 提高UnsupportedWheel(%s在此平台上不受支持."%wheel.filename) pip.exceptions.UnsupportedWheel:numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl在此平台上不受支持.
d:\Program Files\WinPython-64bit-3.4.2.4\python-3.4.2.amd64\Scripts\pip run on 01/23/15 11:55:21 numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform. Exception information: Traceback (most recent call last): File "D:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "D:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run InstallRequirement.from_line(name, None)) File "D:\Python34\lib\site-packages\pip\req.py", line 167, in from_line raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename) pip.exceptions.UnsupportedWheel: numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
怎么了?
推荐答案
简短答案:将文件重命名为numpy-1.9.1%2Bmkl-cp34-none-win32.whl
进行安装.
Short answer: rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl
to install it.
您可以通过运行以下命令来检查您的pip
工具接受安装的哪些标签:
You can check what tags your pip
tool accepts for installation by running:
import pip; print(pip.pep425tags.get_supported())
在这种情况下,pip错误地检测到您的操作系统为32位,并且您要安装的文件的文件名为win_amd64
.
In this case pip is incorrectly detecting your operating system to be 32-bits and the file you're trying to install was win_amd64
in its filename.
如果将文件重命名为numpy-1.9.1%2Bmkl-cp34-none-win32.whl
(现在包含被视为受支持的标签),则可以安装该软件包.这是一个技巧,因为该文件仍是为64位构建的,但这使您可以按预期安装软件包.
If you rename the file to numpy-1.9.1%2Bmkl-cp34-none-win32.whl
(which now contains the tags that are considered supported) then you can install the package. It's a trick because the file is still built for 64-bits but this allows you to install the package as intended.
这篇关于无法从转盘格式安装numpy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!