Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'build_py_2to3' from 'distutils.command.build_py' #25

Open
zultron opened this issue Jul 15, 2022 · 1 comment

Comments

@zultron
Copy link

zultron commented Jul 15, 2022

I'm in a weird environment, but this seems to be incompatible with Py3.8:

Processing /tmp/pip3-archive/pymachinetalk-0.13.3.tar.gz
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-4l00c6mq/setup.py", line 24, in <module>
          from distutils.command.build_py import build_py_2to3 as build_py
      ImportError: cannot import name 'build_py_2to3' from 'distutils.command.build_py' (/usr/local/lib/python3.8/dist-packages/setuptools/_distutils/command/build_py.py)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The issue is in this line.

Is this needed because there's still Py2 code in this repo?

@jordan-lgtm
Copy link

It seems like 'build_py_2to3' was removed form setuptools in the newer versions, I downgraded to setuptool version 58 to install the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants