在Mac m2系统下安装InSAR软件isce2

在mac上一直装不上isce,感谢lijun99的帮助,终于装上了,这是他的isce安装流程:Mac isce2安装

我下面照搬了一下他的流程,只是最后的编译的地方有所修改,主要是mdx不要安装,就可以编译成功。再次感谢lijun99的帮助。

  1. 安装xcode

    sudo rm -rf /Library/Developer/CommandLineTools/
    xcode-select --install

  2. 将conda改为mamba因为安装软件包速度更快

    复制代码
    ~/miniconda3/bin/conda install mamba
    ~/miniconda3/bin/mamba init zsh # or bash 
    source ~/.zshrc # not needed when you open a new Terminal 
  3. 安装gfortran

    复制代码
     brew install gfortran
     /opt/homebrew/bin/gfortran --version # check 

4.创建isce2环境

复制代码
mamba create -n isce2
mamba activate isce2

5.mdx先不装,可能装了,后面编译不上isce2

复制代码
    brew install openmotif
    brew uninstall openmotif

6.安装isce2对应的软件包

复制代码
mamba install git cmake cython gdal h5py libgdal pytest numpy fftw scipy pybind11 shapely
pip install opencv-python

7.制作一个路径使安装更简单,也可以不需要

复制代码
(isce2) wangxin@wangxindeMac-mini raw %    echo $CONDA_PREFIX 
/Users/wangxin/.local/share/mamba/envs/isce2

   ln -sf `python3 -c 'import site; print(site.getsitepackages()[0])'` $CONDA_PREFIX/packages

8.下载isce2软件

复制代码
    git clone https://github.com/isce-framework/isce2.git

9.安装软件

复制代码
    cd isce2
    mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
  -DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \
  -DCMAKE_Fortran_COMPILER="/opt/homebrew/bin/gfortran-14"

10.配置环境

如果您按照上述步骤操作,ISCE2软件包将安装到$CONDA_PREFIX/packages/isce2。您只需要添加堆叠应用程序的路径,这是我的对应路径

复制代码
 83 
 84 #isce2
 85 export ISCE_HOME="/Users/wangxin/.local/share/mamba/envs/isce2/packages/isce"
 86 export PATH="$ISCE_HOME/applications:$PATH"
 87 
  1. 第二种编译,编译到isce2软件里

如果你的isce2 下载到这个地方

复制代码
/Users/wangxin/Softwares/isce2

你也可以编译到这里

复制代码
cmake .. -DCMAKE_INSTALL_PREFIX=/Users/wangxin/Softwares/isce2 \
  -DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \
  -DCMAKE_Fortran_COMPILER="/opt/homebrew/bin/gfortran-14"

make -j

make install

环境配置

复制代码
 83 
 84 #isce2
 85 export ISCE_HOME="/Users/wangxin/Softwares/isce2/packages/isce"
 86 export PATH="$ISCE_HOME/applications:$PATH"
 87 

12.验证安装成功

输入以下命令

复制代码
topsApp.py --steps --help

topsApp.py -h

dem.py

参考网站

https://github.com/lijun99/isce2-install

https://github.com/isce-framework/isce2

相关推荐
摘星编程4 小时前
从云游戏到Mac远程操控:UU远程游戏、办公场景全覆盖
游戏·macos·uu远程
tobebetter95271 天前
How to use homebrew on mac
macos·homebrew
信奥胡老师2 天前
苹果电脑(mac系统)安装vscode与配置c++环境,并可以使用万能头文件全流程
c++·ide·vscode·macos·编辑器
记忆偶然2 天前
语音转文本技术方案评估与工具选型指南
ide·macos·xcode
尽兴-2 天前
MacOS 一键清理指定目录下老旧node_modules
macos
雾蓝回针3 天前
[全网首发]解决Parallels Desktop运行“第五人格“时 使用涂鸦/快捷发言会导致视角偏移的问题
笔记·macos
这儿有一堆花3 天前
视频文件的技术逻辑解析
windows·macos
Sheffi663 天前
iOS Crash 本质与捕获修复方案
macos·ios·cocoa
喵霓3 天前
mac—android-platform-tools介绍
android·macos