python2.7安装numpy时报错信息如下:
C:\Python27\Scripts>pip install "numpy-1.9.2+mkl-cp26-none-win_amd64.whl" numpy-1.9.2+mkl-cp26-none-win_amd64.whl is not a supported wheel on this platfor m.
错误原因:
事实上是因为,我的python为2.7版本,下载的numpy为2.6版本,所以错误。
解决方案:
参见:filename.whl is not supported wheel on this platform
下载和python对应版本的numpy安装文件:
下载版本为cp27的文件。
重新安装运行:
C:\Python27\Scripts>pip install "numpy-1.9.2+mkl-cp26-none-win_amd64.whl" numpy-1.9.2+mkl-cp26-none-win_amd64.whl is not a supported wheel on this platfor m. C:\Python27\Scripts>pip install C:\python-tools\numpy-1.9.2+mkl-cp27-none-win_am d64.whl Processing c:\python-tools\numpy-1.9.2+mkl-cp27-none-win_amd64.whl Installing collected packages: numpy Found existing installation: numpy 1.9.2 Uninstalling numpy-1.9.2: Successfully uninstalled numpy-1.9.2 Successfully installed numpy-1.9.2 C:\Python27\Scripts>
成功安装。
在shell中验证安装成功否:
>>> from numpy import * >>>
时间: 2024-10-28 20:16:36