python的scipy库的安装
2015-12-29 13:42
701 查看
前提:
python的库可以用apt-get安装(如:apt-get install python-sklearn)
也可以用pip安装(如:pip install scikit-learn),但安装的位置不同,安装是包名不同(apt-get安装的python包一般前缀是python),python用的时候优先选择apt-get安装的包。如果用pip freeze 安装的包的版本和在python环境(进入python导包,查看版本)看到的版本不同,可能就是用apt-get和pip都安装了,然后选择性的保留就行了(建议保留pip的)
安装scipy 0.16.1:
1、scipy需要依赖numpy包,先安装numpy
2、用pip install scipy==0.16.1安装scipy,安装时报错:building 'dfftpack' library error:library dfftpacy has Fortran sources but no Fortran compiler found。这是没有安装gfortran编译器(没有gfortran编译器),安装gfortran命令如下:sudo
apt-get install gfortran。
3、重新安装scipy,安装时又报了 numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
4、用ls
/usr/lib | grep blas 查看,缺少了一些libopenblas系统库(缺少libopenblas库),用sudo
apt-get install libopenblas-dev安装该库,安装后查看如下:
5、重新用用pip install scipy==0.16.1安装scipy,结果依然报同一个错误,网上查结果缺少
lapack
库(缺少lapack),安装 lapack 包:$
sudo apt-get install liblapack-dev ,如果还是不行则是缺少
atlas 库再安装 atlas 包:sudo
apt-get install libatlas-dev
6、安装成功后重新安装
scipy 包pip install scipy==0.16.1 成功完成安装。
网上查询后的总结:安装numpy后安装scipy失败(报错:numpy.distutils.system_info.NotFoundError)一般是缺少一些系统库,需要安装:libopenblas-dev、liblapack-dev、libatlas-dev、libblas-dev
python的库可以用apt-get安装(如:apt-get install python-sklearn)
也可以用pip安装(如:pip install scikit-learn),但安装的位置不同,安装是包名不同(apt-get安装的python包一般前缀是python),python用的时候优先选择apt-get安装的包。如果用pip freeze 安装的包的版本和在python环境(进入python导包,查看版本)看到的版本不同,可能就是用apt-get和pip都安装了,然后选择性的保留就行了(建议保留pip的)
安装scipy 0.16.1:
1、scipy需要依赖numpy包,先安装numpy
2、用pip install scipy==0.16.1安装scipy,安装时报错:building 'dfftpack' library error:library dfftpacy has Fortran sources but no Fortran compiler found。这是没有安装gfortran编译器(没有gfortran编译器),安装gfortran命令如下:sudo
apt-get install gfortran。
3、重新安装scipy,安装时又报了 numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
4、用ls
/usr/lib | grep blas 查看,缺少了一些libopenblas系统库(缺少libopenblas库),用sudo
apt-get install libopenblas-dev安装该库,安装后查看如下:
5、重新用用pip install scipy==0.16.1安装scipy,结果依然报同一个错误,网上查结果缺少
lapack
库(缺少lapack),安装 lapack 包:$
sudo apt-get install liblapack-dev ,如果还是不行则是缺少
atlas 库再安装 atlas 包:sudo
apt-get install libatlas-dev
6、安装成功后重新安装
scipy 包pip install scipy==0.16.1 成功完成安装。
网上查询后的总结:安装numpy后安装scipy失败(报错:numpy.distutils.system_info.NotFoundError)一般是缺少一些系统库,需要安装:libopenblas-dev、liblapack-dev、libatlas-dev、libblas-dev
相关文章推荐
- python学习第一天
- 我的Python成长之路---第一天---Python基础(6)---2015年12月26日(雾霾)
- python定时程序(每隔一段时间执行指定函数)
- (转)windows系统下Python环境的搭建
- (转)python requests的安装与简单运用
- (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
- [python]创建文本文件,并读取
- [Python]从安卓手机获取屏幕截图
- python 内存数据库与远程服务
- python 内存数据库与远程服务
- 3. Longest Substring Without Repeating Characters Leetcode Python New season for 2016
- python sklearn环境配置
- [python]代码中包含中文,提示:SyntaxError: Non-ASCII character '\xcd'
- Python 之模块导入
- python BDD&TDD
- Python 迭代器 & __iter__方法
- python中文件的打开与关闭
- python知识-正则表达式
- 升级Python版本脚本
- python 内存NoSQL数据库