cent-os python科学计算环境搭建实录

参考文章:http://blog.csdn.net/guoxiaojie_415/article/details/48133879

tar.gz解压命令:tar -xzvf  tar.gz

一,安装SciPy

1.Cython安装

安装Cpython时发现Python.h没有,在/usr/include下看python2.7里的东西,真的没有

于是yum install python-dev,没用

查了一下发现原理这个系统下要yum install python-devel才行,然后再Cython下python setup.py install,成功

2.numpy安装

 暂无问题

3.lapack安装

发现下载链接http://www.netlib.org/lapack/  dns解析错误,于是掏出了小爬虫爬到了它的ip:160.36.131.221

然后打开发现是http://www.icl.utk.edu/ 。。额,还是打不开,暂时先不管

特么的直接yum吧yum install -y blas blas-devel lapack lapack-devel atlas atlas-devel  --nogpgcheck 

4.scipy安装

发生错误
error: Command "g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Iscipy/interpolate/src -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c scipy/interpolate/src/_interpolate.cpp -o build/temp.linux-x86_64-2.7/scipy/interpolate/src/_interpolate.o" failed with exit status 127

哈?又失败了并且不知道如何处理。

这些包实在太难处理了,有没有一键安装啊。。问了一下群巨结果真的有(吐血)

曰了苟啊

——————————————————

直接选择下载anaconda,注意操作系统位数和python版本。如果安装过程中没有配置环境变量,这里没有选yes

Do you wish the installer to prepend the Anaconda2 install location to PATH in your /root/.bashrc ? [yes|no] [no] >>> You may wish to edit your .bashrc or prepend the Anaconda2 install location:

$ export PATH=/root/anaconda2/bin:$PATH

需要手动配置

vi /etc/profile 在最后一行添加

export PATH=你的安装路径/bin:$PATH

 

posted on 2017-04-05 16:01  此剑之势愈斩愈烈  阅读(132)  评论(0编辑  收藏  举报

导航