Loading

Debian(WSL)安装gprMax教程 - 适用于Windows系统

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

1. gprMax介绍

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

2. 安装方法

2.1 安装和配置conda

$ conda update conda
$ conda install git

2.2 下载gprMax源码

(base) xuan@Xuan-PC:~$ git clone https://github.com/gprMax/gprMax.git
Cloning into 'gprMax'...
remote: Enumerating objects: 13192, done.
remote: Counting objects: 100% (1320/1320), done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 13192 (delta 1260), reused 1238 (delta 1225), pack-reused 11872
Receiving objects: 100% (13192/13192), 189.23 MiB | 6.15 MiB/s, done.
Resolving deltas: 100% (9247/9247), done.

2.3 使用conda_env.yml文件建立gprMax运行环境

(base) xuan@Xuan-PC:~$ cd gprMax/
(base) xuan@Xuan-PC:~/gprMax$ conda env create -f conda_env.yml
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages

2.4 编译并安装gprMax程序

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

3. 常见问题

3.1. gcc问题

(gprMax) xuan@Xuan-PC:~/gprMax$ python setup.py build Running 'build_ext --inplace' running build_ext building 'gprMax.snapshots_ext' extension gcc -pthread -B /home/xuan/miniconda3/envs/gprMax/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/xuan/miniconda3/envs/gprMax/include -fPIC -O2 -isystem /home/xuan/miniconda3/envs/gprMax/include -fPIC -I/home/xuan/miniconda3/envs/gprMax/lib/python3.10/site-packages/numpy/core/include -I/home/xuan/miniconda3/envs/gprMax/lib/python3.10/site-packages/numpy/core/include -I/home/xuan/miniconda3/envs/gprMax/include/python3.10 -c gprMax/snapshots_ext.c -o build/temp.linux-x86_64-cpython-310/gprMax/snapshots_ext.o -O3 -w -fopenmp -march=native error: command 'gcc' failed: Permission denied
xuan@Xuan-PC:/etc/apt$ which gcc /usr/bin/gcc 
xuan@Xuan-PC:/etc/apt$ whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc 
posted @ 2022-12-06 23:40  realXuan  阅读(44)  评论(0编辑  收藏  举报  来源