Fork me on GitHub

安装python-dev

安装这个包,以后安装各种python扩展包,可以省很多事情。

sudo apt-get install python-dev

使用apt-get 安装

只需要下面的几个命令即可,亲测可用。

sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-matplotlib

使用pip 安装

之前使用pip 安装失败, 查过原因之后,是因为缺少了编译所需的库,可以先用apt-get 来安装所需库。

sudo apt-get build-dep python-numpy
sudo apt-get build-dep python-scipy

之后在使用 pip 应该可以(未测试)

sudo pip install numpy
sudo pip install scipy
posted on 2018-04-19 09:21  虚生  阅读(659)  评论(0编辑  收藏  举报