在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

相关推荐
只会写bug的靓仔6 小时前
mac 设置飞书默认浏览器(解决系统设置默认浏览器无效)
macos·飞书
尽兴-21 小时前
Mac「brew」快速安装Redis
数据库·redis·macos·brew
尽兴-21 小时前
Mac 「brew」快速安装MySQL
mysql·macos·adb·brew
明似水1 天前
macOS 更新后找不到钥匙串访问工具的解决方案
macos
一牛1 天前
Appkit: 菜单是如何工作的
macos·ios·objective-c
tkevinjd1 天前
文件操作、流对象示例
macos·objective-c·cocoa
Dachui_11222 天前
MacOS上如何运行内网穿透详细教程
macos
Bruce_Liuxiaowei2 天前
使用Python脚本在Mac上彻底清除Chrome浏览历史:开发实战与隐私保护指南
chrome·python·macos
iFlyCai2 天前
对Mac文字双击或三击鼠标左键没有任何反应
macos·计算机外设
請你喝杯Java3 天前
Mac上Cursor无法安装插件解决方法
macos·cursor·vsode