【三角网格】Ubuntu安装GDAL以及oceanmesh2d

准备工作

修改下载源

临时更改
pip install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple
#全局更改
清华源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

阿里源

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

腾讯源

pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

豆瓣源

pip config set global.index-url http://pypi.douban.com/simple/

安装oceanmesh2d

echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc source ~/.bashrc

安装Pi P

sudo apt update
sudo apt install python3-pip

安装oceanmesh需要cmake、CGAL:

sudo apt install cmake libcgal-dev

克隆 repo 并oceanmesh使用 pip 进行更新/安装。

pip install -U -e .
 ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rrny0ata/inpoly/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rrny0ata/inpoly/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-rrny0ata/inpoly/pip-egg-info
         cwd: /tmp/pip-install-rrny0ata/inpoly/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-rrny0ata/inpoly/setup.py", line 6, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

在安装 inpoly 时缺少 numpy 模块

pip install numpy
pip install -U -e .
 ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpltwfuxit get_requires_for_build_wheel /tmp/tmpe7fb73_y
       cwd: /tmp/pip-install-3910rn0w/rasterio
  Complete output (3 lines):
  <string>:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  WARNING:root:Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
  ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
  ----------------------------------------
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值