Linux下安装numpy
1 下载下载源码包
下载地址 https://pypi.python.org/pypi/numpy/1.10.2
wget https://pypi.python.org/packages/3d/82/a8e9227167dca4301d4d7a61977a50d12cd98c277eb9035d7b78bc8b4a1f/numpy-1.10.2.tar.gz#md5=816518282f1617636aaf26e7cd9b127b
2.解压
tar zxvf numpy-1.10.2.tar.gz
3.进入解压目录
cd numpy-1.10.2
4.运行解压目录里的setup.py 文件(root环境下)
python setup.py install
测试是否安装成功:
[[email protected] ~]$ python
Python 2.7.5 (default, Sep 15 2016, 22:37:39)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import * //导入函数库
>>> eye(4) //生成单位矩阵
array([[ 1., 0., 0., 0.],
[ 0., 1., 0., 0.],
[ 0., 0., 1., 0.],
[ 0., 0., 0., 1.]])
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/1369.html