我尝试在 Windows 子系统 Linux 中将 MKL 与 numpy 链接https://www.intel.com/content/www/us/en/developer/articles/technical/build-numpy-with-mkl-and-icc.html https://www.intel.com/content/www/us/en/developer/articles/technical/build-numpy-with-mkl-and-icc.html
在第4步中,我修改了site.cfg
, numpy/distutils/intelccompiler.py
, and /numpy /distutil /fcompiler /intel.py
,
in python setup.py config --compiler=intelem build_clib --compiler=intelem build_ext --compiler=intelem install
I got
Traceback (most recent call last):
File "setup.py", line 60, in <module>
raise RuntimeError(f'Cannot parse version {FULLVERSION}')
RuntimeError: Cannot parse version 0+unknow
我必须安装吗ifort
to use numpy
with MKL
?如何解决上述错误信息?
您所指的文档是过时的文档。英特尔目前包含英特尔 MKL 优化包以及英特尔 Python 分发版。
英特尔 MKL 优化的 NumPy 和 SciPy 的预构建包可通过 pip 和 conda 通道使用。如果您安装了其中任何一个,您可以使用 pip/conda 包管理器安装这些包的最新版本。请在以下链接中找到多个可用选项以及安装命令:
https://anaconda.org/intel/scipy https://anaconda.org/intel/scipy
https://anaconda.org/intel/numpy https://anaconda.org/intel/numpy
或者,您还可以通过以下链接下载并安装独立的英特尔 Python 分发版或完整的英特尔 oneAPI 基础工具包(其中包括英特尔 Python 分发版以及其他英特尔优化工具),从而获取这些软件包以及其他英特尔优化的 python 软件包:
https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#python https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#python
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html
所有上述选项均可免费获得。由于您要在适用于 Linux 的 Windows 子系统内安装,请确保在 WSL shell 内下载并安装 Linux 版本的 Intel Distribution for Python 或 Intel oneAPI Base Toolkit。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)