Python Windows Scipy 安装:未找到 Lapack/Blas 资源

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28190534/
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-19 02:52:55  来源:igfitidea点击:

Windows Scipy Install: No Lapack/Blas Resources Found

pythonwindowspython-3.xnumpypip

提问by tjb305

I am trying to install python and a series of packages onto a 64bit windows 7 desktop. I have installed Python 3.4, have Microsoft Visual Studio C++ installed, and have successfully installed numpy, pandas and a few others. I am getting the following error when trying to install scipy;

我正在尝试将 python 和一系列软件包安装到 64 位 Windows 7 桌面上。我已经安装了 Python 3.4,安装了 Microsoft Visual Studio C++,并成功安装了 numpy、pandas 和其他一些。尝试安装 scipy 时出现以下错误;

numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

I am using pip install offline, the install command I am using is;

我正在离线使用 pip install,我使用的安装命令是;

pip install --no-index --find-links="S:\python\scipy 0.15.0" scipy

I have read the posts on here about requiring a compiler which if I understand correctly is the VS C++ compiler. I am using the 2010 version as I am using Python 3.4. This has worked for other packages.

我已经阅读了这里关于需要一个编译器的帖子,如果我理解正确的话就是 VS C++ 编译器。我使用的是 2010 版本,因为我使用的是 Python 3.4。这适用于其他软件包。

Do I have to use the window binary or is there a way I can get pip install to work?

我必须使用窗口二进制文件还是有办法让 pip install 工作?

Many thanks for the help

非常感谢您的帮助

采纳答案by Adam Erickson

The solution to the absence of BLAS/LAPACK libraries for SciPy installations on Windows 7 64-bit is described here:

此处描述了在 Windows 7 64 位上安装 SciPy 时缺少 BLAS/LAPACK 库的解决方案:

http://www.scipy.org/scipylib/building/windows.html

http://www.scipy.org/scipylib/building/windows.html

Installing Anaconda is much easier, but you still don't get Intel MKL or GPU support without paying for it (they are in the MKL Optimizations and Accelerate add-ons for Anaconda - I'm not sure if they use PLASMA and MAGMA either). With MKL optimization, numpy has outperformed IDL on large matrix computations by 10-fold. MATLAB uses the Intel MKL library internally and supports GPU computing, so one might as well use that for the price if they're a student ($50 for MATLAB + $10 for the Parallel Computing Toolbox). If you get the free trial of Intel Parallel Studio, it comes with the MKL library, as well as C++ and FORTRAN compilers that will come in handy if you want to install BLAS and LAPACK from MKL or ATLAS on Windows:

安装 Anaconda 容易得多,但您仍然无法在不付费的情况下获得 Intel MKL 或 GPU 支持(它们位于 Anaconda 的 MKL 优化和加速附加组件中 - 我不确定它们是否也使用 PLASMA 和 MAGMA) . 通过 MKL 优化,numpy 在大型矩阵计算上的性能比 IDL 高 10 倍。MATLAB 在内部使用 Intel MKL 库并支持 GPU 计算,因此如果他们是学生,不妨以这个价格使用它(MATLAB 50 美元 + Parallel Computing Toolbox 10 美元)。如果您获得英特尔 Parallel Studio 的免费试用版,它会附带 MKL 库以及 C++ 和 FORTRAN 编译器,如果您想在 Windows 上从 MKL 或 ATLAS 安装 BLAS 和 LAPACK,这些编译器将派上用场:

http://icl.cs.utk.edu/lapack-for-windows/lapack/

http://icl.cs.utk.edu/lapack-for-windows/lapack/

Parallel Studio also comes with the Intel MPI library, useful for cluster computing applications and their latest Xeon processsors. While the process of building BLAS and LAPACK with MKL optimization is not trivial, the benefits of doing so for Python and R are quite large, as described in this Intel webinar:

Parallel Studio 还带有英特尔 MPI 库,可用于集群计算应用程序及其最新的至强处理器。虽然使用 MKL 优化构建 BLAS 和 LAPACK 的过程并非微不足道,但这样做对 Python 和 R 的好处非常大,如本英特尔网络研讨会所述:

https://software.intel.com/en-us/articles/powered-by-mkl-accelerating-numpy-and-scipy-performance-with-intel-mkl-python

https://software.intel.com/en-us/articles/powered-by-mkl-accelerating-numpy-and-scipy-performance-with-intel-mkl-python

Anaconda and Enthought have built businesses out of making this functionality and a few other things easier to deploy. However, it is freely available to those willing to do a little work (and a little learning).

Anaconda 和 Enthought 通过使此功能和其他一些更易于部署的功能来构建业务。但是,对于那些愿意做一些工作(和一些学习)的人来说,它是免费的。

For those who use R, you can now get MKL optimized BLAS and LAPACK for free with R Openfrom Revolution Analytics.

对于那些使用 R 的人,您现在可以通过 Revolution Analytics 的R Open免费获得 MKL 优化的 BLAS 和 LAPACK 。

EDIT: Anaconda Python now ships with MKL optimization, as well as support for a number of other Intel library optimizations through the Intel Python distribution. However, GPU support for Anaconda in the Accelerate library (formerly known as NumbaPro) is still over $10k USD! The best alternatives for that are probably PyCUDA and scikit-cuda, as copperhead (essentially a free version of Anaconda Accelerate) unfortunately ceased development five years ago. It can be found hereif anybody wants to pick up where they left off.

编辑:Anaconda Python 现在附带 MKL 优化,并通过英特尔 Python 发行版支持许多其他英特尔库优化。但是,Accelerate 库(以前称为 NumbaPro)中对 Anaconda 的 GPU 支持仍然超过 1 万美元!最好的替代方案可能是 PyCUDA 和 scikit-cuda,因为 Copperhead(本质上是 Anaconda Accelerate 的免费版本)不幸在五年前停止了开发。如果有人想从他们离开的地方继续,可以在这里找到它。

回答by drewid

The following link should solve all problems with Windows and SciPy; just choose the appropriate download. I was able to pip install the package with no problems. Every other solution I have tried gave me big headaches.

以下链接应该可以解决 Windows 和 SciPy 的所有问题;只需选择合适的下载即可。我能够毫无问题地安装包。我尝试过的所有其他解决方案都让我头疼。

Source: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

资料来源:http: //www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

Command:

命令:

 pip install [Local File Location]\[Your specific file such as scipy-0.16.0-cp27-none-win_amd64.whl]

This assumes you have installed the following already:

这假设您已经安装了以下内容:

  1. Install Visual Studio 2015/2013 with Python Tools
    (Is integrated into the setup options on install of 2015)

  2. Install Visual Studio C++ Compiler for Python
    Source: http://www.microsoft.com/en-us/download/details.aspx?id=44266
    File Name: VCForPython27.msi

  3. Install Python Version of choice
    Source: python.org
    File Name (e.g.): python-2.7.10.amd64.msi

  1. 使用 Python 工具安装 Visual Studio 2015/2013
    (已集成到 2015 安装时的设置选项中)

  2. 为 Python 安装 Visual Studio C++ 编译器
    源:http: //www.microsoft.com/en-us/download/details.aspx?id=44266
    文件名:VCForPython27.msi

  3. 安装 Python 选择版本
    来源:python.org
    文件名(例如):python-2.7.10.amd64.msi

回答by maniac

If you are working with Windows and Visual Studio 2015

如果您使用的是 Windows 和 Visual Studio 2015

Enter the following commands

输入以下命令

  • "conda install numpy"
  • "conda install pandas"
  • "conda install scipy"
  • “畅达安装numpy”
  • “畅达安装熊猫”
  • “畅达安装scipy”

回答by Guy L

My 5 cents; You can just install the entire (pre-compiled) SciPy from https://github.com/scipy/scipy/releases

我的 5 美分;您可以从https://github.com/scipy/scipy/releases安装整个(预编译)SciPy

Good Luck!

祝你好运!

回答by Jaanus

This was the order I got everything working. The second point is the most important one. Scipy needs Numpy+MKL, not just vanilla Numpy.

这是我让一切正常工作的顺序。第二点是最重要的一点。Scipy 需要Numpy+MKL,而不仅仅是香草Numpy

  1. Install python 3.5
  2. pip install "file path"(download Numpy+MKL wheel from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy)
  3. pip install scipy
  1. 安装 python 3.5
  2. pip install "file path"(从这里下载 Numpy+MKL 轮http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  3. pip install scipy

回答by stmatengss

My python's version is 2.7.10, 64-bits Windows 7.

我的 python 版本是 2.7.10,64 位 Windows 7。

  1. Download scipy-0.18.0-cp27-cp27m-win_amd64.whlfrom http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
  2. Open cmd
  3. Make sure scipy-0.18.0-cp27-cp27m-win_amd64.whlis in cmd's current directory, then type pip install scipy-0.18.0-cp27-cp27m-win_amd64.whl.
  1. 下载scipy-0.18.0-cp27-cp27m-win_amd64.whlhttp://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
  2. 打开 cmd
  3. 确保scipy-0.18.0-cp27-cp27m-win_amd64.whlcmd的当前目录中,然后键入pip install scipy-0.18.0-cp27-cp27m-win_amd64.whl

It will be successful installed.

就会安装成功。

回答by aleksk

Sorry to necro, but this is the first google search result. This is the solution that worked for me:

抱歉死掉,但这是第一个谷歌搜索结果。这是对我有用的解决方案:

  1. Download numpy+mkl wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. Use the version that is the same as your python version (check using python -V). Eg. if your python is 3.5.2, download the wheel which shows cp35

  2. Open command prompt and navigate to the folder where you downloaded the wheel. Run the command: pip install [file name of wheel]

  3. Download the SciPy wheel from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy(similar to the step above).

  4. As above, pip install [file name of wheel]

  1. http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy下载 numpy+mkl 轮 。使用与您的 python 版本相同的版本(使用 python -V 检查)。例如。如果你的python是3.5.2,下载显示cp35的轮子

  2. 打开命令提示符并导航到您下载轮子的文件夹。运行命令:pip install [wheel的文件名]

  3. 从以下位置下载 SciPy 轮:http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy (类似于上面的步骤)。

  4. 如上,pip install [wheel的文件名]

回答by Sobhan Moosavi

Using resources at http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipywill solve the problem. However, you should be careful about versions compatibility. After trying for several times, finally I decided to uninstall python and then installed a fresh version of python along with numpy and then installed scipy and this resolved my problem.

使用http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy 上的资源 将解决问题。但是,您应该注意版本兼容性。经过多次尝试,最后我决定卸载python,然后安装新版本的python和numpy,然后安装scipy,这解决了我的问题。

回答by Shimon Doodkin

install intel's distribution of python https://software.intel.com/en-us/intel-distribution-for-python

安装英特尔的 Python 发行版https://software.intel.com/en-us/intel-distribution-for-python

better of for distribution of python should contain them initially

更好的python分布应该最初包含它们

回答by X.Make

For python271、Install numpy + mkl(download link:http://www.lfd.uci.edu/~gohlke/pythonlibs/) 2、install scipy (the same site) OK!

对于python27 1、安装numpy + mkl(下载链接:http: //www.lfd.uci.edu/~gohlke/pythonlibs/) 2、安装scipy(同站)OK!