-
Notifications
You must be signed in to change notification settings - Fork 184
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
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? #678
Comments
|
Ahh, this is getting the surrounding environment. What is your PYTHONPATH set to? Setting that is one way to break pipx, I think. |
@henryiii, could you please confirm if you've had a chance to execute the public repository that demonstrates the bug in a GitHub Codespace (specifically created to allow folks to easily reproduce the bug)? Here's the
Setuptools is already installed in the virtual environment using Python 3.12.2:
It appears that Python 3.10 directories are being added to Additionally, using |
If you fix your sys.path, then this problem goes away. You should not have Python 3.10 in your sys.path if you are using Python 3.12. There are a few things that could be done to alleviate the problem (basically just push it off on some other package) from our side, though:
Of those, the most effort is the third one, but my preferred solution. |
I really don't see where that python3.10 is sneaking in. Everything seems fine in the container, |
Same issue with pdm: pipx install pdm
pdm python install [email protected]
pipx install . --force --python /home/codespace/.local/share/pdm/python/[email protected]/bin/python3
pipx-bug-cli Though it's many times faster since these tools (pdm, hatch, rye) don't build Python from source like pyenv does. I notice the Codespaces is detecting the Poetry file and doing some setup, not sure if that affects anything. |
Also, POSIX has a "C" locale which we should also handle. We can easily fix that, which solves this if the locale is not set to non-English. |
Describe the problem
The following repo was specifically created to outline a reproducible environment with the bug https://github.com/aorumbayev/pipx_bug.
The root cause is incompatibility with python 3.12. And this particular line is the root cause. I will also open this issue on pipx repo, so far i mentioned it on copier where copier maintainers forwarded me to this repo.
To Reproduce
Refer to readme on https://github.com/aorumbayev/pipx_bug
Logs
Expected behavior
plumbum works when used as a transitive dependency in packages installed via pipx
Operating system
Linux
Operating system distribution and version
ubuntu 20
Plumbum version
1.8.2
Python version
3.12.2
Installation method
plumbum is introduced as a transient dependency of copier. https://github.com/copier-org/copier/blob/85311ec658ea7162673489f70e7ec5a8d6b5367b/poetry.lock#L862
The text was updated successfully, but these errors were encountered: