无法使用 Intel MKL 安装 Scipy
Can't install Scipy with Intel MKL
我使用 Intel MKL 从源代码成功安装了 Numpy "numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg"(主要遵循 https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl 的说明)。 numpy.show_config()
显示如下:
Python 2.7.10 (default, Sep 8 2015, 17:20:17)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.show_config()
lapack_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
blas_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
lapack_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
blas_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
另外 numpy.test()
确实工作正常:
>>> numpy.test()
Running unit tests for numpy
NumPy version 1.12.0.dev0+1380fdd
NumPy relaxed strides checking option: True
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy
Python version 2.7.10 (default, Sep 8 2015, 17:20:17) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)]
nose version 1.3.7
[....................SKIP..........................]
----------------------------------------------------------------------
Ran 5855 tests in 51.180s
OK (KNOWNFAIL=6, SKIP=8)
<nose.result.TextTestResult run=5855 errors=0 failures=0>
但出于某种原因,我无法通过 python setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem install
或 pip install scipy
安装 Scipy。从来源我收到以下错误:
RuntimeError: Running cythonize failed!
正在检查 cython:
cython -V
Cython version 0.23
通过 pip 安装它导致:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ticToS/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qnZ8HE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ticToS/scipy/
知道我做错了什么吗?
我的 OS 是 Thinkpad T450s 上的 Fedora 23。一个附带的问题是,我还认识到 numpy.test()
在不使用英特尔 MKL 的情况下要快得多。对此有什么解释吗?
非常感谢。
通过 groupinstall 安装 redhat-rpm-config
、'Development Tools'
解决了问题。
我使用 Intel MKL 从源代码成功安装了 Numpy "numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg"(主要遵循 https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl 的说明)。 numpy.show_config()
显示如下:
Python 2.7.10 (default, Sep 8 2015, 17:20:17)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.show_config()
lapack_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
blas_opt_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
lapack_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
blas_mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
mkl_info:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include']
另外 numpy.test()
确实工作正常:
>>> numpy.test()
Running unit tests for numpy
NumPy version 1.12.0.dev0+1380fdd
NumPy relaxed strides checking option: True
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy
Python version 2.7.10 (default, Sep 8 2015, 17:20:17) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)]
nose version 1.3.7
[....................SKIP..........................]
----------------------------------------------------------------------
Ran 5855 tests in 51.180s
OK (KNOWNFAIL=6, SKIP=8)
<nose.result.TextTestResult run=5855 errors=0 failures=0>
但出于某种原因,我无法通过 python setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem install
或 pip install scipy
安装 Scipy。从来源我收到以下错误:
RuntimeError: Running cythonize failed!
正在检查 cython:
cython -V
Cython version 0.23
通过 pip 安装它导致:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ticToS/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qnZ8HE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ticToS/scipy/
知道我做错了什么吗?
我的 OS 是 Thinkpad T450s 上的 Fedora 23。一个附带的问题是,我还认识到 numpy.test()
在不使用英特尔 MKL 的情况下要快得多。对此有什么解释吗?
非常感谢。
通过 groupinstall 安装 redhat-rpm-config
、'Development Tools'
解决了问题。