I have a clean, activated Python 3.12.4 virtual environment. In that environment I run:
python3 -m pip install python-dev-tools
This runs without error other than a notice that pip is out of date. It appears that this installation downgrades pip from 24.0 to 22.3.1 for reasons that I do not understand.
I then run this:
python3 -m pip list -o # MRE to demonstrate the issue
…which results in this error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
AttributeError: module ‘pkgutil’ has no attribute ‘ImpImporter’. Did you mean: ‘zipimporter’? purports to explain and resolve this issue. However, despite following the guidance therein the problem persists.
What I’m ultimately trying to do is use the Python development environment to integrate some C code with Python. I can’t seem to find any useful official documentation except for this, where there is no explanation of how to set up the dev environment (e.g., where do I find Python.h
).
There are multiple solutions that propose Homebrew as a way to set up one’s Python dev environment. Is there a pure Python way of doing this?