-
-
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
python applications propagate python and messes up PATH #170887
Comments
|
Not sure if this was closed prematurely. If |
yq is written as |
nixpkgs/pkgs/top-level/python-packages.nix Lines 82 to 91 in 2707877
propagatedBuildInputs is not stripped fails with
|
That's on purpose not done to avoid a rebuild. |
ha I seebut that may be worth a comment then, do you mind if I add one ? |
Not at all, good idea! |
python applications should not propagate python in PATH but we do it nevertheless to avoid rebuilds see NixOS#170887 for an explanation.
What is the motivation for that? So you can override the search path? This would get tricky if you have a tool installed in your profile, and then work with a new version and surprisingly you get the old version from your profile. OTOH, I also think standard environment variables should typically still function. |
what I had in mind is :
but I suppose it wont avoid a rebuild so that's not a good idea anyway, let's forget about it xD |
python applications should not propagate python in PATH but we do it nevertheless to avoid rebuilds see #170887 for an explanation.
Describe the bug
I have the equivalent of
I start my shell with nix develop / nix-shell. Then when I run python I get a basic python != myPythonEnvWithSomeLibraries. I investigated a bit and turns out that
yq
is a python application and it has python in its propagatedBuildInputs.When I enter my nix-shell yq's propagated python ends up at the beginning of my PATH, thus shadowing myPythonEnvWithSomeLibraries's interpreter.
I have 2 questions then:
Expected behavior
Python applications should not shadow my shell python interpreter.
Notify maintainers
cc @FRidh
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: