创建python2.7
创建giant的Python2.7环境:
conda create -n python-giant python=2.7
激活giant的Python2.7环境:
conda activate python-giant
安装依赖
conda install numpy=1.11.2 h5py=2.6 scipy=0.18.1 matplotlib cython pywavelets lxml -y
安装pygrib
conda安装:
conda install -c conda-forge pygrib=2.0.1 -y
apt install ffmpeg mencoder
创建python链接
如果系统有默认的Python2,调用conda创建的Python2不方便,可以创建一个链接。
根据实际情况修改如下命令中的路径
sudo ln -s /home/fanchengyan/.conda/envs/python-giant/bin/python /usr/bin/python-giant
sudo apt install python-numpy=1.11.2 python-scipy=0.18.1
python-h5py=2.6 python-matplotlib cython python-pywt python-lxml python-grib=2.0.1 libopenblas-dev liblapack-dev -y
安装可选项:
sudo apt install ffmpeg mencoder hdfview ipython -y
首先,将giant复制到想要安装的位置,然后配置环境变量
根据需要将如下配置路径进行修改:
export GIANT=/home/fanchengyan/opt/giant/GIAnT:/home/fanchengyan/opt/giant/GIAnT/SCR:/home/fanchengyan/opt/giant/GIAnT/solver
export PYTHONPATH=$GIANT:$PYTHONPATH