Linux下安装numpy

Linux下安装numpy
1 下载下载源码包
<pre>
下载地址 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
</pre>

2.解压
tar zxvf numpy-1.10.2.tar.gz

3.进入解压目录
cd numpy-1.10.2

4.运行解压目录里的setup.py 文件(root环境下)
python setup.py install

测试是否安装成功:
<pre>
[yqtao@localhost ~]$ 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.]])
</pre>

posted @ 2019-11-14 12:51  newmiracle宇宙  阅读(4394)  评论(0编辑  收藏  举报