无法从轮格式安装 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
来自 Gohlke 网站
复制到pip.exe文件夹中的numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl
numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl copied in the pip.exe folder
日志文件显示:
d:Program FilesWinPython-64bit-3.4.2.4python-3.4.2.amd64Scriptspip run on 01/23/15 11:55:21numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl 在此平台上不受支持.异常信息:回溯(最近一次调用最后一次):文件D:Python34libsite-packagespipasecommand.py",第 122 行,在主目录中status = self.run(options, args)运行中的文件D:Python34libsite-packagespipcommandsinstall.py",第 257 行InstallRequirement.from_line(name, None))文件D:Python34libsite-packagespip eq.py",第 167 行,在 from_lineraise UnsupportedWheel("%s 不是这个平台上支持的轮子." % wheel.filename)pip.exceptions.UnsupportedWheel: numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl 不是该平台支持的轮子.
d:Program FilesWinPython-64bit-3.4.2.4python-3.4.2.amd64Scriptspip 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:Python34libsite-packagespipasecommand.py", line 122, in main status = self.run(options, args) File "D:Python34libsite-packagespipcommandsinstall.py", line 257, in run InstallRequirement.from_line(name, None)) File "D:Python34libsite-packagespip eq.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屋!