Home > Mobile >  Problem with simpleeval installation:use _2to3 invalid
Problem with simpleeval installation:use _2to3 invalid

Time:09-27

We are using poetry to upgrade packages and deploy to our servers but some issue is stopping us from deploying our work continuously to our servers.The code below is the stacktrack where our code stops.

$ 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│                 )
      1179except CalledProcessError as e:
    → 1180raise EnvCommandError(e, input=input_)
      11811182return decode(output)
      11831184def execute(self, bin, *args, **kwargs):
Cleaning up file-based variables
ERROR: Job failed: exit code 1

I am suspecting some package update broke it as 3 days ago this step worked fine in the Gitlab CI.

CodePudding user response:

I encountered the same error some time ago. The issue seems to be connected with the latest upgrade of setuptools package (https://setuptools.pypa.io/en/latest/history.html#v58-0-0). The workaround that is working for me is to use setuptools<=57.5.0.

  • Related