python - 使用 WSL 中的 numpy 在安装 MKL 时引发 RuntimeError(f'Cannot parse version {FULLVERSION}')
问题描述
我试图将 MKL 与 Windows 子系统 Linux 中的 numpy 链接 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
, 和/numpy /distutil /fcompiler /intel.py
,
在python setup.py config --compiler=intelem build_clib --compiler=intelem build_ext --compiler=intelem install
我有
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
才能使用numpy
吗MKL
?如何解决上述错误信息?
解决方案
您所指的文档是过时的文档。英特尔目前包括英特尔 MKL 优化包以及英特尔 Python 分发包。
英特尔 MKL 优化的 NumPy 和 SciPy 的预构建包可通过 pip 和 conda 通道使用。如果您安装了其中任何一个,您可以使用 pip/conda 包管理器安装这些包的最新版本。请在以下链接中找到多个可用选项以及安装命令:
https://anaconda.org/intel/scipy
https://anaconda.org/intel/numpy
或者,您还可以通过以下链接下载并安装独立的 Intel Distribution for Python 或完整的 Intel oneAPI Base Toolkit(包括 Intel Distribution for Python 以及其他 Intel 优化工具)来获取这些包以及其他 Intel 优化的 python 包:
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html
上述所有选项均免费提供。由于您在适用于 Linux 的 Windows 子系统中进行安装,因此请确保在 WSL shell 中下载并安装 Intel Distribution for Python 或 Intel oneAPI Base Toolkit 的 Linux 版本。
推荐阅读
- react-native - 如何在虚拟键盘后面保留一个按钮?
- css - 搜索框表现奇怪并在移动设备上更改其边界半径 - 我无法在桌面上重现该问题
- entity-framework - ASP.NET Core EF Identity - 尝试将城市和国家/地区数据播种到单独的表中,设置 PK 不起作用
- javascript - React/TypeScript:解构的 JS PropTypes 没有被选为推断的 TS 类型?
- python - 为什么我的视频没有从 fileField.uploadTo(relative_path) 正确上传并保存在正确的专用目录中?
- karate - 空手道嵌套模式包含“不需要”不起作用?
- pip - 如何在 RHEL6 中安装 pip 以在 python 2.6.6 中使用“virualenv”
- javascript - 如何在 React 中获取地图函数中的最后一项
- prolog - 如何将谓词的结果交换为相反的结果?真到假,反之亦然
- arrays - 我有一个带有首字母缩略词的 csv 文件,以及另一个带有这些首字母缩略词翻译的文件,如何使用翻译后的信息生成一个新的 .csv 文件?