虚拟机+Ubuntu18安装ISCE2.5(适合小白)

虚拟机+Ubuntu18安装ISCE

1、环境VMware15+Ubuntu18
2、依赖软件:
gcc >= 4.8+ (with C++11 support)
fftw >= 3.2.2 (with single precision support)
Python >= 3.5 (3.6 preferred)
cons >= 2.0.1
curl - for automatic DEM downloads
GDAL and its Python bindings >= 2.2
3、python环境搭建
(1)下载conda并安装(网上有教程)
(2)创建虚拟环境

conda create -n your_env_name python=3.6

(3)激活虚拟环境

source activate your_env_nam

(4)下面时python虚拟环境需要安装的
cython
gdal
git
h5py
libgdal
pytest
numpy
fftw
scipy
basemap
scons
opencv

将它们放在requirements.txt文件中,然后执行下列命令实现环境搭建

```bash
conda install --yes --file requirements.txt

至此,conda虚拟环境搭建完成。
4.ISCE安装
(1)下载ISCE源码
(2)安装依赖软件sudo 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 gdal-bin(这个自己建议还是全部安装,本人前期部分没装,后期再跑程序的时候出现了各种bug)
注意:前面2中的依赖软件,以及conda中的依赖软件,和这儿的依赖软件环境都要安装,否则也会在后期出现问题。
(3)编译
方法一:采用scons编译:
首先设置scons环境变量:

export PYTHONPATH=/home/lu/isce2/configuration
export SCONS_CONFIG_DIR=/home/lu/isce2/

在isce安装包下新建文本文件,命名为SConfigISCE,内容如下:

PRJ_SCONS_BUILD=/home/lu/isce2/build
PRJ_SCONS_INSTALL=/home/lu/isce2/install/isce
LIBPATH=/usr/lib/x86_64-linux-gnu /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
CPPPATH=/usr/include/x86_64-linux-gnu /usr/include /usr/include/python3.6m /usr/include/hdf5/serial /usr/include/gdal
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/include/X11
ENABLE_CUDA=False

因为我的是虚拟机,不能用显卡加速,所以最后两行必须删除
终端输入:scons
方法二:采用cmake编译:
依赖软件:

  • CMake ≥ 3.13
  • GCC ≥ 4.8 (with C++11 support)
  • Python ≥ 3.5
  • Cython
  • FFTW 3
  • GDAL
    依次执行下列命令完成编译
cd isce2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/my/isce/install/location
make install

(4)环境配置
在主目录下,ctrl+H,然后打开.bashrc文件,在最后面加入:

export ISCE_ROOT=/home/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

(5)检测
首先在终端输入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']

注意:
(1)在安装过程中还是遇到了很大的问题,主要原因还是安装gdal的原因,显示根据网上的通过下列指令安装gdal开发环境:

sudo apt-get install libgdal-dev
sudo apt-get install gdal-bin

(2)编译ISCE时一直出错,若安装多版本存在的会出错
(3)建议大家还是使用cmake编译安装,比较简单。

  • 9
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 23
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 23
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值