如何在 Windows 64 位上为 python 2.7 安装 numpy+mkl?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41217793/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install numpy+mkl for python 2.7 on windows 64 bit?
提问by Hari
I've already installed numpy 1.9.0 in Python.Now what should I do to get numpy+mkl?
我已经在 Python 中安装了 numpy 1.9.0。现在我该怎么做才能获得 numpy+mkl?
回答by Guillaume Jacquenot
If you do not have an entire Python distribution or you do not want to install one, you can download and install a compiled whl
package from Christoph Gohlke's webpage. This whl
contains numpy
and is linked against mkl
. When installing this package, you install both: numpy
with the mkl
dependencies.
如果您没有完整的 Python 发行版或不想安装,您可以whl
从Christoph Gohlke 的网页下载并安装一个编译包。这whl
包含numpy
并链接到mkl
. 安装此软件包时,您将同时安装:numpy
与mkl
依赖项。
All you have to do is:
您所要做的就是:
- download the correct
whl
file (Choose the right Python version and 32/64 file) - open a Windows cli with
Windows+R
and by running insidecmd
- go to the directory where you have downloaded the
whl
file, withcd
instructions - run
pip install numpy?1.XX.Y+mkl?cp3X?cp3Xm?win_amd64.whl
- 下载正确的
whl
文件(选择正确的 Python 版本和 32/64 文件) Windows+R
通过在里面运行和打开一个 Windows clicmd
- 转到您下载
whl
文件的目录,并附有cd
说明 - 跑
pip install numpy?1.XX.Y+mkl?cp3X?cp3Xm?win_amd64.whl
For example, the command can be
例如,命令可以是
pip install numpy?1.11.3+mkl?cp35?cp35m?win_amd64.whl
You can do it for any package with some code that has to be compiled
您可以为任何具有必须编译的代码的包执行此操作
回答by jmd_dk
The easiest way is to install an entire Python distribution with lots of included packages, such as numpy and mkl. I would suggest the Anaconda Python distribution, https://www.continuum.io/downloads
最简单的方法是安装包含许多包的完整 Python 发行版,例如 numpy 和 mkl。我建议使用 Anaconda Python 发行版,https://www.continuum.io/downloads
回答by mrk
The above answer does great (+1) and brought me on the right track, but to clear things up even more:
上面的答案做得很好(+1)并使我走上了正确的轨道,但要使事情更加清晰:
- You can download the
.whl
from here - For choosing the right
.whl
you need to know numpy?1.11.3+mkl?cpXX?cpXXm?win_amd64.whl where the XXare actually your python version (e.g. 36 for python version 3.6.x) - Do
pip install numpy?1.11.3+mkl?cp**XX**?cp**XX**m?win_amd64.whl
in your cmd window and the place where you did download the.whl
into
- 你可以
.whl
从这里下载 - 为了选择正确的,
.whl
你需要知道 numpy?1.11.3+mkl?cp XX?cp XXm?win_amd64.whl 其中XX实际上是你的 python 版本(例如 36 表示 python 版本 3.6.x) - 不要
pip install numpy?1.11.3+mkl?cp**XX**?cp**XX**m?win_amd64.whl
在你的CMD窗口和地方,你没有下载.whl
到