ubuntu 下Python pip install numpy scipy and matplotlib
来源:互联网 发布:编程猫可以加盟吗 编辑:程序博客网 时间:2024/05/21 09:15
不同的ubuntu版本安装过这三个模块几次了,然而总是出现各种问题,最近一次是在ubuntu 16.04 LTS server版本安装的,总的来说安装的比较顺利。
先把pip安装好
sudo apt-get install python-pip
接着是安装numpy
直接输入命令
sudo pip install numpy
这一步成功安装
然后安装scipy
sudo pip install scipy
这一步出乎意料的成功安装(之前的版本提示缺少某些库,解决的办法是把所需的库下载好,然后放到/usr/lib)
接着是安装matplotlib
sudo pip install matplotlib
这一步出现了问题 提示依赖的包libpng和fretype缺少
好吧,那么首先安装libpng 输入命令
sudo apt-get install libpng-dev
可以成功安装
安装freetype倒是有点问题
首先使用wget 下载最新的包
输入命令
wget http://ftp.yzu.edu.tw/nongnu//freetype/freetype-2.6.tar.gz
就下载到了当前目录
然后解压 tar zxvf freetype-2.6.tar.gz
解压之后 三部曲
./configure
make
sudo make install
然后再次安装matplotlib 发现依旧有问题,还是freetype里面的ft2build.h没有找到,然后我们可以看到其实这个包已经安装到了/usr/local/include/freetype2/路径下面,这个路径下面是有这个文件的,
就算使用ln -s /usr/include/freetype2/链接一下,依然没有反应
后面发现是fontconfig开发库缺少,所以输入命令
sudo apt-get install libfontconfig1-dev
安装完了之后输入命令
sudo pip install matplotlib
DONE!!!
完美安装
- ubuntu 下Python pip install numpy scipy and matplotlib
- python install numpy+scipy+matplotlib
- ubuntu 下 python numpy,scipy,matplotlib安装
- 在windows下python,pip,numpy,scipy,matplotlib的安装
- 在windows下python,pip,numpy,scipy,matplotlib的安装
- Ubuntu环境下完美安装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
- Windows下Python机器学习环境搭建(pip numpy scipy matplotlib scikit-learn nltk)
- 在windows下python,pip,numpy,scipy,matplotlib的安装 系统:win7(64bit)
- windows下python配置numpy、matplotlib、scipy
- windows下python配置numpy、matplotlib、scipy
- python下安装numpy、matplotlib、scipy过程
- windows下python配置numpy、matplotlib、scipy
- windows下python,numpy,scipy,matplotlib安装
- Verilog有符号数据类型一点个人理解
- 第X大的数
- 在父xib文件中复用子 xib的做法
- spring import 使用
- 线程和进程的区别
- ubuntu 下Python pip install numpy scipy and matplotlib
- 课程设计(一)
- MUI 获取手机中的联系人来生成电话簿
- ORA-12560: TNS: 协议适配器错误(环境变量的设置问题)
- Linux使用Tips
- php常量的定义和使用
- MySQL基础教程5-数据库基础回顾
- torch 踩坑小结
- 节点node和元素element的区别