ubuntu下安装numpy,matplotlib

本文指导了在Ubuntu系统中安装numpy和matplotlib的过程,包括安装numpy、scipy、libpng、freetype以及matplotlib所需的步骤。
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

如果没报错就说明安装成功!


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值