gpt4 book ai didi

ubuntu - GDAL 不会安装到 GitHub Actions Ubuntu venv

转载 作者:行者123 更新时间:2023-12-04 18:26:53 31 4
gpt4 key购买 nike

我的 .yml 代码如下所示,用于测试为 Git 上的存储库创建的每个拉取请求。

  name: Python Linux application

on:
pull_request:
branches: [ '**' ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install libproj-dev proj-data proj-bin
sudo apt-get install libgeos-dev
sudo apt-get install gdal-bin libgdal-dev libgdal-doc
pip install wheel
pip install flake8 pytest Cython numpy proj geos GDAL==3.2.3
if [ -f requirements-linux.txt ]; then pip install -r requirements-linux.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
经过数千 (11390) 行错误代码后,这是最终错误:
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/hostedtoolcache/Python/3.9.5/x64/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rkrb3fqi/gdal_c6b10766da894ef6b4738e8ab6e2acd7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rkrb3fqi/gdal_c6b10766da894ef6b4738e8ab6e2acd7/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9qjem06l/install-record.txt --single-version-externally-managed --compile --install-headers /opt/hostedtoolcache/Python/3.9.5/x64/include/python3.9/GDAL Check the logs for full command output.
我已经尝试安装所有我能找到的与 GDAL 相关的 header ,但似乎没有任何效果。

最佳答案

修复了它,对于那些处于类似情况的人来说,这是这个问题的答案:

      sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
pip install GDAL==3.2.3

关于ubuntu - GDAL 不会安装到 GitHub Actions Ubuntu venv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68261477/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com