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

Installation error: Can not execute setup.py since setuptools is not available in the build environment. #276

Open
jcdrubay opened this issue Feb 5, 2022 · 5 comments · May be fixed by #287
Labels

Comments

@jcdrubay
Copy link

jcdrubay commented Feb 5, 2022

Describe the bug

pip install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master

Collecting git+https://github.com/OCA/openupgradelib.git@master
  Cloning https://github.com/OCA/openupgradelib.git (to revision master) to /private/var/folders/sj/mcq6_pw11flcfgzwm4fthr2c0000gn/T/pip-req-build-cxi_vltb
  Running command git clone --filter=blob:none --quiet https://github.com/OCA/openupgradelib.git /private/var/folders/sj/mcq6_pw11flcfgzwm4fthr2c0000gn/T/pip-req-build-cxi_vltb
  Resolved https://github.com/OCA/openupgradelib.git to commit 0a7420696a6945824186f34f5c45026f41afcfe8
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [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.

Affected versions

master

Expected behavior

Installation without error

Additional context

  • OSx with M1
  • Python 3.7.9
  • pip 22.0.3
  • Running inside a virtual environment using pyenv
  • Ran pip install -U setuptools in the venv, but still get the error

Related issue ?

Maybe this very new issue is the same: https://stackoverflow.com/questions/70992675/python-setuptools-is-not-available-in-the-build-environment

@jcdrubay jcdrubay added the bug label Feb 5, 2022
@jcdrubay
Copy link
Author

jcdrubay commented Feb 5, 2022

This is fixed by using python 3.8.10

@pedrobaeza
Copy link
Member

Now you can do pip install openupgradelib directly. Have you tried?

@jcdrubay
Copy link
Author

Sorry @pedrobaeza I did not see your message until now. I still face the same issue with python 3.7.9 and pip install openupgradelib and the workaround still works.

@pedrobaeza
Copy link
Member

OK, let's keep it opened, but nobody has experimented more this problem.

@sbidoul sbidoul linked a pull request Apr 3, 2022 that will close this issue
@sbidoul
Copy link
Member

sbidoul commented Apr 3, 2022

@jcdrubay you are likely trying to install openupgradelib in an environment where setuptools is not available.

This is okay, in the modern packaging ecosystem, but the project then needs to declare explicitly that setuptools is its build backend. Which I did in #287.

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

Successfully merging a pull request may close this issue.

3 participants