simpleeval installation:use _2to3 无效的问题

Problem with simpleeval installation:use _2to3 invalid

我们正在使用 poetry 来升级包并部署到我们的服务器,但一些问题阻止我们将我们的工作持续部署到我们的 servers.The 代码下面是我们的代码停止的堆栈跟踪。

$ poetry update 
Creating virtualenv kpbackend-ad2VTdyQ-py3.9 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 171 installs, 0 updates, 0 removals
  • Installing shortuuid (1.0.1)
  • Installing simpleeval (0.9.10)
  • Installing starkbank-ecdsa (1.1.1)
  • Installing starlette (0.13.8)
  EnvCommandError
  Command ['/root/.cache/pypoetry/virtualenvs/kpbackend-ad2VTdyQ-py3.9/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/49/c9/a8/c45627062eb893ac0685ce1146f6b868eea117d5803fc63c56d21326de/simpleeval-0.9.10.tar.gz'] errored with the following return code 1, and output: 
  Processing /root/.cache/pypoetry/artifacts/49/c9/a8/c45627062eb893ac0685ce1146f6b868eea117d5803fc63c56d21326de/simpleeval-0.9.10.tar.gz
      ERROR: Command errored out with exit status 1:
       command: /root/.cache/pypoetry/virtualenvs/kpbackend-ad2VTdyQ-py3.9/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-408xzy97/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-408xzy97/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-lfjp6ggy
           cwd: /tmp/pip-req-build-408xzy97/
      Complete output (1 lines):
      error in simpleeval setup command: use_2to3 is invalid.
      ----------------------------------------
  WARNING: Discarding file:///root/.cache/pypoetry/artifacts/49/c9/a8/c45627062eb893ac0685ce1146f6b868eea117d5803fc63c56d21326de/simpleeval-0.9.10.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  
  at /usr/local/lib/python3.9/site-packages/poetry/utils/env.py:1180 in _run
      1176│                 output = subprocess.check_output(
      1177│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1178│                 )
      1179│         except CalledProcessError as e:
    → 1180│             raise EnvCommandError(e, input=input_)
      1181│ 
      1182│         return decode(output)
      1183│ 
      1184│     def execute(self, bin, *args, **kwargs):
Cleaning up file-based variables
ERROR: Job failed: exit code 1

我怀疑一些软件包更新破坏了它,因为 3 天前这一步在 Gitlab 中工作正常 CI。

我前段时间遇到了同样的错误。该问题似乎与 setuptools 软件包的最新升级有关 (https://setuptools.pypa.io/en/latest/history.html#v58-0-0)。对我有用的解决方法是使用 setuptools<=57.5.0.