ISCE开源软件Linux系统配置-小白从头到尾篇
虚拟机+Ubuntu系统安装安装Anaconda下载清华大学Anaconda镜像ISCE安装ISCEgithub地址根据说明文件,首先需要检查基本软件状况。2.1 安装githubsudo apt install git2.2 clone源码git clone https://github.com/isce-framework/isce2.git2.1...
·
查询python版本
安装Anaconda
是否添加环境变量,yes
打开一个新终端,检查是否安装成功
不成功则执行
sudo gedit ~/.bashrc
txt末尾添加
export PATH="/home/xupp/anaconda3/bin:$PATH"
更新环境变量
source ~/.bashrc
- 配置Anaconda中的python环境
3.1 下载源码
ISCEgithub地址
conda install git
git clone https://github.com/isce-framework/isce2.git
3.2 在anaconda中配置所需要的python环境
cd Downloads
cd isce2
conda list -e > requirements.txt
修改文件内容
配置依赖环境
conda install --yes --file requirements.txt
【注】安装时总是出错,最终选择conda install一个包一个包的安装orz,时间有限就不寻根溯源了
3.3 building ISCE
逐个安装,避免出错
apt install -y
gfortran
libmotif-dev
libhdf5-dev
libfftw3-dev
libgdal-dev
scons
python3
cython3
python3-scipy
python3-matplotlib
python3-h5py
python3-gdal
python3-pip
wget
curl
gdal-bin
libx11-dev
libxt-dev
libmotif-dev(为了Xm.h)
设置shell环境变量SCONS_CONFIG_DIR并查看
sudo gedit ~/.bashrc
在文档末尾添加
export SCONS_CONFIG_DIR=/home/lll/isce2
更新变量
source gedit ~/.bashrc
在isce2/docker中找到SConfigISCE,复制到SConstruct同目录下txt,按照👆提示编辑内容
编辑结果👇 因为是虚拟机所以将cuda注释掉了,注意build目录和install目录都以isce结尾,否则import包和调用时会出现问题
# The directory in which ISCE will be built
PRJ_SCONS_BUILD = /home/lll/isce2/build/isce
# The directory into which ISCE will be installed
PRJ_SCONS_INSTALL = /home/lll/isce2/install/isce
# The location of libraries, such as libstdc++, libfftw3 (for most system
# it's /usr/lib and/or /usr/local/lib/ and/or /opt/local/lib) /usr/lib/x86_64-linux-gnu
LIBPATH = /home/lll/anaconda3/lib
# The location of Python.h. If you have multiple installations of python
# make sure that it points to the right one /usr/include/hdf5/serial
CPPPATH = /home/lll/anaconda3/include/python3.6m /home/lll/anaconda3/lib/python3.6/site-packages/numpy/core/include /home/lll/anaconda3/include
# The location of the fftw3.h (most likely something like /usr/include or
# /usr/local/include /opt/local/include
FORTRANPATH = /usr/include
# The location of your Fortran compiler. If not specified it will use the system one
FORTRAN = /usr/bin/gfortran
# The location of your C compiler. If not specified it will use the system one
CC = /usr/bin/gcc
# The location of your C++ compiler. If not specified it will use the system one
CXX = /usr/bin/g++
#libraries needed for mdx display utility
MOTIFLIBPATH = /usr/lib64 # path to libXm.dylib
X11LIBPATH = /usr/lib # path to libXt.dylib
MOTIFINCPATH = /usr/include # path to location of the Xm
# directory with various include files (.h)
X11INCPATH = /usr/include # path to location of the X11 directory
# with various include files
# list of paths to search for shared libraries when running programs
RPATH = /opt/conda/lib /usr/lib64 /usr/lib
#Explicitly enable cuda if needed
ENABLE_CUDA = False
#CUDA_TOOLKIT_PATH = $YOUR_CUDA_INSTALLATION #/usr/local/cuda
开始编译
cd isce2
scons
如果编译报错,应该是配置文件路径问题,根据报错内容,利用以下命令进行查找包的位置和修改路径
locate
find
whereis
3.4 添加环境变量
如果不小心改错了PATH,导致terminal无法使用命令
export PATH=/bin:/usr/bin
sudo gedit ~/.bashrc
就可以打开文件修改回来了
3.5 测试是否成功
更多推荐
已为社区贡献2条内容
所有评论(0)