Ubuntu 14.04上安装pip3/numpy/matplotlib/scipy操作步骤

Ubuntu 14.04 64位上默认安装了两个版本的python,一个是python2.7.6,另外一个是python3.4.0,如下图所示:

安装完pip3的结果如下图所示:

升级完pip3的结果如下图所示:

安装完numpy的结果如下图所示:

通过sudo pip3 install matplotlib安装matplotlib时会出现six相关的错误,如下图所示,这里直接通过sudo apt-get install python3-matplotlib安装matplotlib正常:

通过sudo apt-get install python3-scipy安装SciPy。

以上用到的suyo所有命令如下:

sudo apt-get update
sudo apt-get install python3-pip # 安装pip3,若安装支持python2的pip,则执行 sudo apt-get install pip
sudo pip3 install --upgrade pip # 升级pip3
sudo pip3 install numpy # 安装numpy
sudo apt-get install python3-matplotlib # 安装matplotlib
sudo apt-get install python3-scipy # 安装scipy

可以从GitHub的 https://github.com/fengbingchun/Python_Test 下载相关Python测试代码用来验证Numpy,Matplotlib,SciPy是否安装正确,测试代码可以在widnows和linux运行。

GitHubhttps://github.com/fengbingchun/Python_Test 

猜你喜欢

转载自blog.csdn.net/fengbingchun/article/details/81590102