ubuntu下安装numpy,matplotlib
2015-08-20 16:59
603 查看
Ubuntu下安装numpy and matplotlib
安装numpy,命令如下:
sudo apt-get install python-numpy
sudo apt-get install python-scipy
安装matplotlib
第1步.需要先安装其依赖的包libpng和freetype
安装libpng:
sudo apt-get install libpng-dev
安装freetype:
先下载freetype,命令如下:
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz
然后解压:
tar zxvf freetype-2.4.10.tar.gz
然后进入freetype目录,安装freetype,命令如下:
cd freetype-2.4.10/
./congfigure
make
sudo make install
第2步.安装pip,然后通过pip来安装matplotlib:
sudo apt-get install python-pip
第3步.安装好pip后就可以用下面的命令来查找matplotlib和查看其安装状态
sudo pip search matplotlib
第4步.安装matplotlib
sudo pip install matplotlib
在终端进入python,输入
import numpy
import matplotlib
如果没报错就说明安装成功!
安装numpy,命令如下:
sudo apt-get install python-numpy
sudo apt-get install python-scipy
安装matplotlib
第1步.需要先安装其依赖的包libpng和freetype
安装libpng:
sudo apt-get install libpng-dev
安装freetype:
先下载freetype,命令如下:
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz
然后解压:
tar zxvf freetype-2.4.10.tar.gz
然后进入freetype目录,安装freetype,命令如下:
cd freetype-2.4.10/
./congfigure
make
sudo make install
第2步.安装pip,然后通过pip来安装matplotlib:
sudo apt-get install python-pip
第3步.安装好pip后就可以用下面的命令来查找matplotlib和查看其安装状态
sudo pip search matplotlib
第4步.安装matplotlib
sudo pip install matplotlib
在终端进入python,输入
import numpy
import matplotlib
如果没报错就说明安装成功!
相关文章推荐
- python+Eclipse+pydev环境搭建
- python __name__ == '__main__'解析
- python __init__.py文件的作用
- python动态按区域显示
- 装饰器与函数式Python(译)
- 在类Unix系统上开始Python3编程入门
- Python的sched模块
- [Python爬虫] Selenium自动访问Firefox和Chrome并实现搜索截图
- Python中字典映射类型的学习教程
- 浅淡Python 3.x中encode、decode方法
- python正则表达式几个例子
- Python 使用正则表达式 - 2
- Python3字符串学习教程
- python中if __name__ == '__main__': 的解析
- Python中列表和元组的相关语句和方法讲解
- python --类方法、对象方法、静态方法
- python 字典
- python基础二——list与字符串
- Python 中的进程、线程、协程、同步、异步、回调
- 在 Python 中使用 GDB 来调试 转载