Loading

MacOS安装gprMax教程

原文发布于:https://blog.zhaoxuan.site/archives/19.html;
第一时间获取最新文章请关注博客个人站:https://blog.zhaoxuan.site

1. gprMax介绍

gprMax是为模拟地面穿透雷达(GPR)而设计的模拟电磁波传播的开源软件。

2. 安装过程

2.1.1 初始化gprMax的Python运行环境

$ conda update conda
$ conda install git
$ git clone https://github.com/gprMax/gprMax.git
$ cd gprMax
$ conda env create -f conda_env.ym

2.2.2 安装gcc

$ brew install gcc
(过程中可能提示需要使用“xcode-select --install”命令安装Xcode命令行工具,根据提示安装即可。)

2.2.2 安装gprMax

(gprMax)$ python setup.py build
(gprMax)$ python setup.py install

3. 常见问题

3.1 #include <_stdio.h> … :

问题描述:

/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12/include-fixed/limits.h:203:75: error: no include path in which to search for limits.h
  203 | #include_next <limits.h>                /* recurse down to the real one */
      |                                                                           ^
In file included from /Users/Xuan/miniconda3/envs/gprMax/include/python3.10/Python.h:25:
/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/gcc/aarch64-apple-darwin22/12/include-fixed/stdio.h:78:10: fatal error:_stdio.h: No such file or directory
   78 | #include <_stdio.h>
      |          ^~~~~~~~~~
compilation terminated.

解决方案: 安装Xcode命令行工具。

4. 参考

Getting Started — gprMax User Guide

posted @ 2022-12-06 23:38  realXuan  阅读(40)  评论(0编辑  收藏  举报  来源