问题描述
我一直在尝试使用Windows上的BLAS快速运行Numpy,到目前为止,看来可行的唯一方法是从 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy .
I've been trying to get a working fast numpy with BLAS on Windows, and so far, the only method that seems feasible is downloading the precompiled library with MKL from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy.
到目前为止,还可以,但是稍后再尝试numpy.__config__.show()
时,我看到它指向了不存在的目录,例如C:\program files (x86)\IntelSWTools
So far ok, but chekcing later numpy.__config__.show()
, I see it points to directories that don't exist, such as C:\program files (x86)\IntelSWTools
我假设numpy试图将MKL库放置在此目录中,但是我没有在C:\program files (x86)
中创建文件的管理特权.
I assume numpy is trying to place the MKL libraries in this directory, but I have no administration privileges for creating files in C:\program files (x86)
.
有没有简单的方法来使用numpy发行版并将MKL库安装在另一个目录中?例如pip install filename.whl --some_option_to_install_mkl_in_another_dir
?
Is there any simple way to use this numpy distribution and install the MKL libs in another directory? Such as a pip install filename.whl --some_option_to_install_mkl_in_another_dir
?
(Windows 7 64位,python 3.5.2)
(Windows 7 64bit, python 3.5.2)
已尝试:
-
使用
pip install <package> --user
:似乎与没有--user
的同一命令安装方式完全相同. (我的默认安装文件夹为aldready用户文件夹)
Use
pip install <package> --user
: it seems to install everything exactly the same way as the same command without--user
. (My default installation folder is aldready the user folder)
用户pip install <package> --root <some_path>
:将所有内容安装在传递的路径中,但是Numpy配置仍然指向C:\program files (x86)\IntelSWTools
,并且即使我在PATH
和PYTHONPATH
中都添加了<some_path>
,python也找不到numpy.环境变量
User pip install <package> --root <some_path>
: installs everything in the passed path, but Numpy config still points to C:\program files (x86)\IntelSWTools
, and python cannot find numpy, even if I add <some_path>
to both PATH
and PYTHONPATH
environment vars
尝试创建带有行[global]
和target=E:\destination
的pip.ini
文件.目标文件夹保持不变.
Tried to create the pip.ini
file, with the lines [global]
and target=E:\destination
. The destination folder remains untouched.
将wheels文件重命名为zip
,找到包含IntelSWTools文件夹的所有文件,将所有这些文件夹更改为我可以访问的文件夹.再次使其成为Wheels文件并进行pip安装.绝对没有文件出现在我选择的文件夹中,但numpy config指向该文件夹. -这让我感到奇怪:此发行版确实安装了MKL吗?
Rename the wheels file to zip
, find all files containing the IntelSWTools folder, change all these folders to one that I have access to. Make it a wheels file again and pip install. Absolutely no file appears in the folder I chose, but numpy config is pointing to that folder. -- This makes me wonder: does this distribution really installs MKL?
推荐答案
Numpy+MKL
不会将MKL库放置(或尝试放置)在C:\program files (x86)\IntelSWTools
中.在使用pip安装过程中,将使用numpy + MKL所需的 MKL运行时DLL 复制到sys.prefix\Lib\site-packages\numpy\core
.
Numpy+MKL
does not place (or try to place) MKL libraries in C:\program files (x86)\IntelSWTools
. The MKL runtime DLLs necessary to use numpy+MKL are copied to sys.prefix\Lib\site-packages\numpy\core
during installation with pip.
C:\program files (x86)\IntelSWTools
是用于构建numpy + MKL的 MKL开发文件(链接库,头文件,DLL,文档)的位置.如果要从依赖MKL开发文件的源代码构建其他软件,则需要从以下位置下载MKL英特尔.
C:\program files (x86)\IntelSWTools
is the location of the MKL development files (link libraries, header files, DLLs, documentation) that were used to build numpy+MKL. If you want to build other software from source that relies on MKL development files, you need to download MKL from Intel.
这篇关于Gohlke的numpy + mkl安装-在Windows上更改MKL安装目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!