准备工作
修改下载源
临时更改
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.
----------------------------------------