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
Is your feature request related to a problem? Please describe
I've installed some python CLI commands with pip. My pip is wrapped by asdf and so it points to a python version that was installed with asdf's Python plugin.
Now, if I run any pip-installed command via asdf, PATH is modified so that the associated python installation's bin folder comes before asdf shims. So, if I execute a system command inside this scope, the asdf shims don't apply, because the {python-version}/bin comes first in the PATH.
The same issue affects any pip-installed CLI commands. For example, I installed poetry==1.1.8 with pip inside this python version. Now that version of poetry takes precedense over any asdf-managed version, when executing poetry from inside python.
As a practical example, I set:
asdf local poetry 1.5.1
With this asdf provides the expected version (not 1.1.8 which is the default in my case):
poetry --version
Poetry (version 1.5.1)
Running python directly, I get the expected result:
Is your feature request related to a problem? Please describe
I've installed some python CLI commands with
pip
. Mypip
is wrapped byasdf
and so it points to a python version that was installed withasdf
's Python plugin.Now, if I run any pip-installed command via asdf,
PATH
is modified so that the associated python installation's bin folder comes before asdf shims. So, if I execute a system command inside this scope, the asdf shims don't apply, because the{python-version}/bin
comes first in thePATH
.Would it be possible to avoid this?
My setup:
The
PATH
rewriting by asdf Python plugin can be demonstrated with a python command.Executed via asdf:
python -c "import os; print(os.environ['PATH'])"
Which is the same as:
Executed directly:
The same issue affects any pip-installed CLI commands. For example, I installed
poetry==1.1.8
withpip
inside this python version. Now that version of poetry takes precedense over any asdf-managed version, when executingpoetry
from inside python.As a practical example, I set:
asdf local poetry 1.5.1
With this asdf provides the expected version (not 1.1.8 which is the default in my case):
Running python directly, I get the expected result:
/Users/juhoautio/.asdf_rosetta/installs/python/3.7.17/bin/python -c \ "import subprocess; subprocess.check_call(['poetry', '--version'])"
But via asdf the shim for
poetry
gets overridden by the version from the chosen python's bin:python -c "import subprocess; subprocess.check_call(['poetry', '--version'])"
Describe the proposed solution
I would like to see this when invoking via asdf:
Executed via asdf:
python -c "import os; print(os.environ['PATH'])"
So otherwise the same as currently, but with this part removed:
/Users/juhoautio/.asdf_rosetta/installs/python/3.7.17/bin:
Is there some valid reason why pip-installed commands should behave differently when executed via asdf vs. directly?
Describe similar
asdf
features and why they are not sufficientN/A
Describe other workarounds you've considered
N/A
The text was updated successfully, but these errors were encountered: