如何在 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 00:37:45  来源:igfitidea点击:

How to install numpy+mkl for python 2.7 on windows 64 bit?

pythonnumpy

提问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 whlpackage from Christoph Gohlke's webpage. This whlcontains numpyand is linked against mkl. When installing this package, you install both: numpywith the mkldependencies.

如果您没有完整的 Python 发行版或不想安装,您可以whlChristoph Gohlke 的网页下载并安装一个编译包。这whl包含numpy并链接到mkl. 安装此软件包时,您将同时安装:numpymkl依赖项。

All you have to do is:

您所要做的就是:

  • download the correct whlfile (Choose the right Python version and 32/64 file)
  • open a Windows cli with Windows+Rand by running inside cmd
  • go to the directory where you have downloaded the whlfile, with cdinstructions
  • 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)并使我走​​上了正确的轨道,但要使事情更加清晰:

  1. You can download the .whlfrom here
  2. For choosing the right .whlyou 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)
  3. Do pip install numpy?1.11.3+mkl?cp**XX**?cp**XX**m?win_amd64.whlin your cmd window and the place where you did download the .whlinto
  1. 你可以.whl这里下载
  2. 为了选择正确的,.whl你需要知道 numpy?1.11.3+mkl?cp XX?cp XXm?win_amd64.whl 其中XX实际上是你的 python 版本(例如 36 表示 python 版本 3.6.x)
  3. 不要pip install numpy?1.11.3+mkl?cp**XX**?cp**XX**m?win_amd64.whl在你的CMD窗口和地方,你没有下载.whl