本来是想记录一下安装全过程,要是哪儿出bug了,能让大lao帮帮我来着,因为实在是自己安装了好几遍都没成功运行,所以就想着记录下来发到网上提问,谁知道记着记着,自己就装好了,并且运行成功了,当然最后出了点错误,但都自己解决了,终于,折磨了我两天的fastStructure软件安装成功!溜了溜了,如果以后有哪位同学也跟我一样困难重重,希望这篇文章能帮到他吧~
conda create -n fastStructure_py2 python=2.7 cython scipy numpy matplotlib
安装的包有:
下载并安装 GSL (GNU Scientific Library):
wget http://ftp.acc.umu.se/mirror/gnu.org/gnu/gsl/gsl-latest.tar.gz
tar -zxvf gsl-latest.tar.gz
rm gsl-latest.tar.gz
cd gsl-2.7.1/
mkdir /home/username/software/gsl
在此之后,配置并安装 GSL:
./configure --prefix=/home/LY/software/gsl
make
make check
make install
nano ~/.bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/LY/software/gsl/lib
export CFLAGS="-I/home/LY/software/gsl/include"
export LDFLAGS="-L/home/LY/software/gsl/lib"
source ~/.bash_profile
重新激活环境
source ~/anaconda3/bin/activate fastStructure
下载并编译 fastStructure。从 GitHub 下载源代码并解压缩:
wget --no-check-certificate https://github.com/rajanil/fastStructure/archive/master.tar.gz
tar zxvf master.tar.gz
cd fastStructure-master/
到这儿都没啥问题,但是编译fastStructure的时候就出问题
pip install cython==0.27.3
这个警告信息并不影响程序的运行,只是提醒你正在使用已经被弃用的 NumPy API,可以通过定义 NPY_NO_DEPRECATED_API 来禁用此警告。你可以在编译时加上 -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION 选项来禁用此警告:
python setup.py build_ext --inplace -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
然后,尝试运行一个测试:结果又报错了
cd /home/LY/software/fastStructure-master
python structure.py -K 2 --input=tests/testdata --output=test_output
下面在vars中编译 fastStructure
cd vars/
python setup.py build_ext --inplace -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
感谢分享。分享也是一种梳理提升的过程,你做到了,恭喜!:)