首先ISCE2.3不能用cmake编译安装,故只能用scons编译安装。
1、conda环境安装
(1)下载conda并安装(网上有教程)
设置conda环境变量
export PATH=$PATH:/home/bing/anaconda3/bin
(2)创建虚拟环境
conda create -n your_env_name python=3.6
(3)激活虚拟环境
source activate your_env_nam
(4)下面时python虚拟环境需要安装的
cython
gdal=2.2.2
git
h5py
libgdal
pytest
numpy
fftw
scipy
basemap
scons
opencv
注意:由于自己是在虚拟环境中编译安装ISCE,所以在运行ISCE也需要在虚拟环境中。
2、命令行安装
安装依赖软件`sudo apt install -y gfortran libmotif-dev libhdf5-dev libfftw3-dev
3、下载ISCE2.3
4、scons编译安装
首先设置ISCE环境
```bash
export PYTHONPATH=/home/lu/isce2/configuration
export SCONS_CONFIG_DIR=/home/bing/lu/isce2/
5、在isce安装包下新建文本文件,命名为SConfigISCE
内容如下:
PRJ_SCONS_BUILD=/home/bing/lu/isce2/build
PRJ_SCONS_INSTALL=/home/bing/lu/isce2/install/isce
LIBPATH=/usr/lib/x86_64-linux-gnu /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial /home/bing/anaconda3/envs/isce2/lib /usr/local/lib
CPPPATH=/usr/include/x86_64-linux-gnu /usr/include /home/bing/anaconda3/envs/isce2/include/python3.6m /usr/include/hdf5/serial /usr/local/include /home/bing/anaconda3/envs/isce2/include
FORTRANPATH=/usr/include /usr/lib/gcc/x86_64-linux-gnu/7/finclude
FORTRAN=/usr/bin/gfortran
CC=/usr/bin/gcc
CXX=/usr/bin/g++
MOTIFLIBPATH = /usr/lib/x86_64-linux-gnu
X11LIBPATH = /usr/lib/x86_64-linux-gnu
MOTIFINCPATH = /usr/include/Xm
X11INCPATH =/usr/lib/x86_64-linux-gnu
ENABLE_CUDA=False
5、编译
终端运行:
scons
6、设置环境变量
export ISCE_ROOT=/home/bing/lu/isce2/install
export ISCE_HOME=$ISCE_ROOT/isce
export PATH=$ISCE_HOME/bin:$ISCE_HOME/applications:$PATH
export PYTHONPATH=$ISCE_ROOT:$ISCE_HOME/applications:$ISCE_HOME/components:$ISCE_HOME/library
7、测试
在终端虚拟环境下运行
topsApp.py --step --help
出现以下界面
Using default ISCE Path: /home/bing/isce/install/packages/isce
This is the Open Source version of ISCE.
Some of the workflows depend on a separate licensed package.
To obtain the licensed package, please make a request for ISCE
through the website: https://download.jpl.nasa.gov/ops/request/index.cfm.
Alternatively, if you are a member, or can become a member of WinSAR
you may be able to obtain access to a version of the licensed sofware at
https://winsar.unavco.org/software/isce
2021-04-06 16:05:12,030 - isce.insar - INFO - ISCE VERSION = 2.5.1, RELEASE_SVN_REVISION = ,RELEASE_DATE = 20210305, CURRENT_SVN_REVISION =
ISCE VERSION = 2.5.1, RELEASE_SVN_REVISION = ,RELEASE_DATE = 20210305, CURRENT_SVN_REVISION =
None
The currently supported sensors are: ['SENTINEL1']
安装完成。