在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

相关推荐
心灵宝贝6 小时前
Kite Compositor for Mac v2.1.2 安装教程|DMG文件安装步骤(Mac用户必看)
macos
他们都不看好你,偏偏你最不争气10 小时前
【iOS】UIViewController
开发语言·macos·ios·objective-c·cocoa
李游Leo12 小时前
Rust 开发环境安装与 crates.io 国内源配置(Windows / macOS / Linux 全流程)
windows·macos·rust
库奇噜啦呼16 小时前
【iOS】UIViewController生命周期
macos·ios·cocoa
开开心心loky18 小时前
[iOS] 属性关键字
macos·ios·objective-c·cocoa·xcode
帅得不敢出门1 天前
macOS苹果电脑运行向日葵远程控制软件闪退
windows·macos·远程控制·向日葵
夏小花花1 天前
Mac m系列芯片向日葵打不开 解决方案
macos·mac
刹_那1 天前
MAC 多个版本 JDK进行切换
macos
应凌云1 天前
Mac环境Neovim 与 LazyVim 安装指南
macos
开开心心loky1 天前
[iOS] ViewController 的生命周期
macos·ui·ios·objective-c·cocoa