ubuntu 14.04配置python安装第三方库(numpy,scipy,matplotlib等)
来源:互联网 发布:卡密自动发货源码 编辑:程序博客网 时间:2024/06/05 01:15
ubuntu安装python第三方库的两种方法
直接使用系统自带命令安装,这种方式能够正确解决第三方库复杂的依赖关系。
$ sudo apt-get install python-[package name]
使用python推荐的包管理工具pip,这种方法也是比较方便的,但是首先需要安装pip,具体的使用方法可以help查看
$ sudo apt-get install python-pip$ sudo pip install [package name]
常见的问题
使用系统自带的命令安装时,会出现一系列依赖
以及找不到第三方库
的问题,例如安装numpy过程中出现
libblas3gf : 依赖: libblas3 但是它将不会被安装
libgfortran3 : 依赖: gcc-4.8-base (= 4.8.2-19ubuntu1) 但是 4.8.4-2ubuntu1~14.04 正要被安装
E: 有未能满足的依赖关系。
这时首先要保证系统所使用的源要正确。经过试验使用清华大学更新服务器几乎所有的依赖和第三方库都可以找到,所以推荐使用。
换源
$ sudo gedit /etc/apt/sources.list
加入源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse更新源
$ sudo apt-get update
接着尝试着再次安装所需要的第三方库,看看问题是否解决。我在处理这个问题时参考了以下两篇博客Python下科学计算包numpy和scipy的安装 和 菜鸟ubuntu下安装scipy全过程 。其中过程都非常复杂,但是我经过换源后就发现问题解决了,如果不幸你并没有解决问题,可以试一试博客中介绍的方法。
- ubuntu 14.04配置python安装第三方库(numpy,scipy,matplotlib等)
- 在Ubuntu Linux 安装Python第三方库:NumPy,SciPy,Matplotlib, Scikit-Learn,Theao等
- 在python下安装这个第三方库numpy、scipy、matplotlib
- ubuntu 下 python numpy,scipy,matplotlib安装
- Python: Ubuntu 安装numpy,scipy,matplotlib
- Python:Ubuntu安装numpy,scipy,matplotlib
- Python: Ubuntu 安装numpy,scipy,matplotlib
- Ubuntu-Python安装 scipy,numpy,matplotlib
- 安装配置Python+Numpy+Scipy+Matplotlib环境
- Python配置第三方库numpy、scipy、theano
- windows下python的第三方包 numpy scipy matplotlib 简便安装
- python 安装numpy,scipy,matplotlib算法库
- Ubuntu安装numpy,scipy,matplotlib
- Ubuntu 安装numpy,scipy,matplotlib
- python:安装numpy, Scipy,Matplotlib
- python使用安装numpy、scipy、matplotlib等工具包
- Ubuntu环境下完美安装python模块numpy,scipy,matplotlib
- Ubuntu环境下 安装python工具包numpy,scipy,matplotlib
- Linux Netcat 命令——网络工具中的瑞士军刀
- android studio之build.gradle写法简介
- Android项目开发填坑记-Fragment的onBackPressed
- HBase 数据库检索性能优化策略
- 软件设计之模块划分
- ubuntu 14.04配置python安装第三方库(numpy,scipy,matplotlib等)
- CodeForces 600E Lomsat gelral(树形dp+启发式合并)
- 浅谈个人对互联网未来发展的见解
- ZOJ 3946 Highway Project 单源最短路
- 如何保存grep 结果里面的换行符?
- Shell之网站日志的PV,UV计算
- iOS开发系列--地图与定位
- Android使用NotificationManager来进行任务栏通知(使用Bmob第三方推送)
- 基于NI9237模块实现应变检测