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

Python 3.12 requires dependency setuptools #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jan 30, 2024

% python3.12 -m pip install pipx
% pipx install setuptools-py2cfg
% setuptools-py2cfg

Traceback (most recent call last):
File "/Users/cclauss/.local/bin/setuptools-py2cfg", line 5, in
from setuptools_py2cfg import main
File "/Users/cclauss/.local/pipx/venvs/setuptools-py2cfg/lib/python3.12/site-packages/setuptools_py2cfg.py", line 7, in
import setuptools
ModuleNotFoundError: No module named 'setuptools'


Fix: pipx inject setuptools-py2cfg setuptools


https://docs.python.org/3.12/whatsnew/3.12.html

gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.

Also, the following might be a problem for some setups that use Cython.

```
% python3.12 -m pip install pipx
% pipx install setuptools-py2cfg
% setuptools-py2cfg
```
> Traceback (most recent call last):
  File "/Users/cclauss/.local/bin/setuptools-py2cfg", line 5, in <module>
    from setuptools_py2cfg import main
  File "/Users/cclauss/.local/pipx/venvs/setuptools-py2cfg/lib/python3.12/site-packages/setuptools_py2cfg.py", line 7, in <module>
    import setuptools
ModuleNotFoundError: No module named 'setuptools'
@cclauss
Copy link
Contributor Author

cclauss commented Apr 17, 2024

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

Successfully merging this pull request may close these issues.

None yet

1 participant