You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then inside xonsh, a different Python interpreter is used:
nix-shell
xonsh
python -c "import requests"# -> ModuleNotFoundError: No module named 'requests'
Expected behavior
Running xonsh should not modify the PATH such that a different python executable is used. In the above, when we run python we should get the requests library.
Workarounds
Running $PATH.pop(0) removes the problematic PATH entry but this is pretty hacky.
ETA: looks ok but if anyone still has dontWrapPythonPrograms = true in their config they should probably remove it before upgrading xonsh or they may get #301444.
ETA: looks ok but if anyone still has dontWrapPythonPrograms = true in their config they should probably remove it before upgrading xonsh or they may get #301444.
To make it clear, dontWrapPythonPrograms = true was reapplied in #302385, while reverting #297628.
Activity
charmoniumQ commentedon Nov 7, 2023
I think the recommended way to do this is to add an override to xonsh.
See #240246
andrew222651 commentedon Jan 18, 2024
That's a help but if I launch a nested xonsh by running
xonsh -iin xonsh, the extra packages are gone.I've removed these unwanted
PATHentries by doing, e.g. inconfiguration.nix:Everything works fine so far.
andrew222651 commentedon Apr 24, 2024
@SamLukeYes since your PR was reverted is this issue still fixed?
ETA: looks ok but if anyone still has
dontWrapPythonPrograms = truein their config they should probably remove it before upgrading xonsh or they may get #301444.SamLukeYes commentedon Apr 24, 2024
To make it clear,
dontWrapPythonPrograms = truewas reapplied in #302385, while reverting #297628.SamLukeYes commentedon Jul 9, 2024
Oops, it seems we have re-introduced this issue in #314728