CentOS 6.5默认为Python 2.6.6,升级Python 2.7之后(参考:Centos_6.5_python),因为yum只支持Python2.6.6,如果用yum安装scipy,会安装到Python2.6.6上,因此需要下载scipy安装包手动安装,进入目录执行:

1
python setup.py install

但是会报错:

1
blas_mkl_info: libraries mkl,vml,guide not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib'] NOT AVAILABLE openblas_info: libraries not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib'] NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib'] NOT AVAILABLE atlas_blas_info: libraries f77blas,cblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib'] NOT AVAILABLE /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:1521: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: libraries blas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib'] NOT AVAILABLE /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:1530: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:1533: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable.

但是系统中明明已经安装了blas等,并且用yum安装blas会提示已经安装,其实是blas-devel和lapack-devel没有安装,因此执行:

1
yum install blas-devel lapack-devel

即可顺利安装scipy。

参考:install-scipy-module-on-centos

最后更新: 2019年04月19日 21:37

原始链接: http://andersjing.com/2016/01/02/2016-01-02-python_scipy/

× 请打赏~
打赏二维码