-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
pre-commit clobbers python311 PYTHONPATH entries with references to python310 packages #223275
Comments
I'm working around this by just commenting
If there's a smarter workaround I'd love to know about it. |
In my case it's sort of the opposite. I had a Python env ( When I printed the |
@fabaff I'm sorry to apply "touched it last" logic here, but I can see that you're active and you probably know a bit more about how this works than I do. Would you be willing to share any thoughts you have about this? |
this needs to be done nixpkgs/pkgs/tools/package-management/poetry/default.nix Lines 49 to 53 in fc7d9a1
|
That's very helpful, thanks @Artturin. I'll attempt a PR to fix this, hopefully this weekend. |
I get a similar error using
Weirdly, I cannot reproduce it with |
Describe the bug
If you install pre-commit alongside python311, the python311 site-packages directory disappears from the PYTHONPATH, which (I think) causes other packages to break.
nix-shell --pure -p pkgs.python311 pkgs.pre-commit
has PYTHONPATH entries:Notice that the above list does not include any python 3.11 entries. To get those you have to remove pre-commit (
nix-shell --pure -p pkgs.python311
):The actual problem that lead me here had to do with
pkgs.python311Packages.psycopg
being unable to satisfy its runtime requirements. The problem went away when I removedpkgs.pre-commit
.I've documented that separately, but haven't filed it as an issue yet. I'm not 100% sure that PYTHONPATH is the issue, but it does seem like pre-commit is being a noisy neighbor in some way or another.
Steps To Reproduce
Contrast the output of these commands:
with the output of these...
Expected behavior
I'm not sure, but whatever it is I don't think that installing pre-commit should hide
python3.11/site-packages
Notify maintainers
@borisbabic
Metadata
The text was updated successfully, but these errors were encountered: