0

我正在尝试使用“make build”命令构建一个 python 项目,但在执行此操作时遇到错误。它早些时候工作,但最近开始抛出这个错误。

Collecting backports.zoneinfo (from -r requirements.txt (line 4))
  Downloading https://<ARTIFACTORY_URL>/artifactory/api/pypi/pypi-release/packages/packages/ad/85/475e514c3140937cf435954f78dedea1861aeab7662d11de232bdaa90655/backports.zoneinfo-0.2.1.tar.gz (74kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-dcqnjb0t/backports.zoneinfo/setup.py", line 26, in <module>
        setuptools.setup(ext_modules=[c_extension])
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 121, in setup
        dist.parse_config_files()
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/dist.py", line 494, in parse_config_files
        ignore_option_errors=ignore_option_errors)
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 106, in parse_configuration
        meta.parse()
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 382, in parse
        section_parser_method(section_options)
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 355, in parse_section
        self[name] = value
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 173, in __setitem__
        value = parser(value)
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 430, in _parse_version
        version = self._parse_attr(value)
      File "/usr/src/venv/lib/python3.6/site-packages/setuptools/config.py", line 305, in _parse_attr
        module = import_module(module_name)
      File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'backports'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dcqnjb0t/backports.zoneinfo/
You are using pip version 9.0.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

直接单击工件链接时会下载该软件包。

我尝试使用单独安装软件包

pip install backports-zoneinfo

但仍然遇到同样的问题。venv的python版本是Python 3.8.8

这是需求文件:

gunicorn==19.9.0
MarkupSafe==1.1.1
backports.zoneinfo
flask
flake8
blinker==1.4
marshmallow==2.13.5
flasgger==0.9.2
pytest
firewall==1.1
sftpip==1.1
python-json-logger
pytest-cov
hvac
apscheduler
cryptography==2.2.2

点子列表:

Package            Version
------------------ ----------
appdirs            1.4.4
APScheduler        3.7.0
asn1crypto         1.4.0
attrs              20.3.0
backports.weakref  1.0.post1
backports.zoneinfo 0.2.1
.....
4

0 回答 0