您好我正在尝试将 scitools-iris 模块与 AWS Glue 一起使用,并将 Glue 作业配置为 PyPI 存储库。
当我将以下参数传递给 Job 时,它没有获得所需的模块。
--additional-python-modules scitools-iris==3.1.0
--python-module-installer-option --upgrade
我正在使用 Glue 版本 3.0 (Spark 3.1) Python 3
从日志中我看到 scitools-iris 模块正在使用 pip 安装。一些依赖项似乎是导致问题的原因。(没有找到与 cartopy>=0.18 匹配的分布)
这是我在 Glue 作业错误日志中看到的错误。
ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp1_hz74fc cwd: /tmp/pip-install-2rd50us9/cartopy_f604400b23bc4c9195b811d50edee5b4 Complete output (3 lines): setup.py:120: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail. '.'.join(str(v) for v in GEOS_MIN_VERSION), )) Proj 8.0.0 must be installed. ----------------------------------------WARNING: Discarding https://files.pythonhosted.org/packages/fc/59/aa52698e3838f4cd0e7eaa75bd86837e9e0b05041dbdaee3cda2fffced06/Cartopy-0.20.1.tar.gz#sha256=91f87b130e2574547a20cd634498df97d797abd12dcfd0235bc0cdbcec8b05e3 (from https://pypi.org/simple/cartopy/) (requires-python:>=3.7). Command errored out with exit status 1: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp1_hz74fc Check the logs for full command output. ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpl6mo6_tj cwd: /tmp/pip-install-2rd50us9/cartopy_8957449adeb94a0bb9a0c66fafb580e2 Complete output (3 lines): setup.py:120: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail. '.'.join(str(v) for v in GEOS_MIN_VERSION), )) Proj 8.0.0 must be installed. ----------------------------------------WARNING: Discarding https://files.pythonhosted.org/packages/0f/c0/58453b036e79046d211f083880d58dcce787e7e07647ac25dc46c6555099/Cartopy-0.20.0.tar.gz#sha256=eae58aff26806e63cf115b2bce9477cedc4aa9f578c5e477b2c25cfa404f2b7a (from https://pypi.org/simple/cartopy/) (requires-python:>=3.7). Command errored out with exit status 1: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpl6mo6_tj Check the logs for full command output. ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpe8jzc0wv cwd: /tmp/pip-install-2rd50us9/cartopy_5beae2c284f44dcdb98887b1813d1733 Complete output (3 lines): setup.py:120: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail. '.'.join(str(v) for v in GEOS_MIN_VERSION), )) Proj 4.9.0 must be installed. ----------------------------------------WARNING: Discarding https://files.pythonhosted.org/packages/ed/ca/524ce33692df3faeaa56852fb6a33b0b410be94cc288417565b96fef3f64/Cartopy-0.19.0.post1.tar.gz#sha256=4b8b4773a98ed7009fe17d9b6ec87ac3ac62b7d14634d7768c190eadc647d576 (from https://pypi.org/simple/cartopy/) (requires-python:>=3.5). Command errored out with exit status 1: /usr/bin/python3 /home/spark/.local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpe8jzc0wv Check the logs for full command output. ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2rd50us9/cartopy_bb77a9a0d1f148359db39e8999dc6ef3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2rd50us9/cartopy_bb77a9a0d1f148359db39e8999dc6ef3/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rb9czy0g cwd: /tmp/pip-install-2rd50us9/cartopy_bb77a9a0d1f148359db39e8999dc6ef3/ Complete output (3 lines): /tmp/pip-install-2rd50us9/cartopy_bb77a9a0d1f148359db39e8999dc6ef3/setup.py:107: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail. '.'.join(str(v) for v in GEOS_MIN_VERSION), )) Proj 4.9.0 must be installed. ----------------------------------------WARNING: Discarding https://files.pythonhosted.org/packages/46/c1/04e50c9986842f00f7db0e7a65caa896840050d7328f74e5b7437aa01179/Cartopy-0.18.0.tar.gz#sha256=7ffa317e8f8011e0d965a3ef1179e57a049f77019867ed677d49dcc5c0744434 (from https://pypi.org/simple/cartopy/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.ERROR: Could not find a version that satisfies the requirement cartopy>=0.18 (from scitools-iris) (from versions: 0.11.0, 0.12.0.4, 0.12.0.5, 0.13.0, 0.13.1, 0.14.0, 0.14.2, 0.15.1, 0.16.0, 0.17.0, 0.18.0b1, 0.18.0b2, 0.18.0rc1, 0.18.0, 0.19.0rc1, 0.19.0.post1, 0.20.0, 0.20.1)ERROR: No matching distribution found for cartopy>=0.18
另一个选项是在 S3 存储桶中设置 python 存储库。我想尝试从外部仓库获取所需的库,而不是在 S3 上设置整个仓库。
更新:我正在尝试使用安装了 docker 的 AmazonLinux2 实例创建模块库。
作为 scitools-iris (3.1.0) 版本的依赖项安装的 Cartopy (>=0.18) 需要 GEOS 3.7.2 或更高版本。
使用 epel 最新版本,我将获得 3.4.2-2.el7。
看起来 conda 可能是管理 iris 比 pip 更好的选择。
谢谢萨蒂什