pipx icon indicating copy to clipboard operation
pipx copied to clipboard

Custom pip path

Open mwriter opened this issue 1 year ago • 10 comments

How can I configure pipx to use the specified pip binary path? Such as PIPX_DEFAULT_PYTHON but for pip.

mwriter avatar Aug 10 '24 20:08 mwriter

This contradicts with pipx's concept of having a shared pip library with that it manages all installed packages. You could use the upgrade-shared command to pin pip to a specific version, or what is your use-case here?

chrysle avatar Aug 12 '24 16:08 chrysle

This contradicts with pipx's concept of having a shared pip library with that it manages all installed packages

Do I understand correctly that in this concept it's possible to change python interpreter but it's impossible to change pip? It seemed to me that the portable version of running through pipx.pyz is just designed not to be tied to anything. And so it turns out that the current version is nailed down and interferes with real portability. Maybe I'm missing something deeply but I don't understand why should be attached to anything at all.

mwriter avatar Aug 12 '24 21:08 mwriter

In addition there are portable python versions such as https://github.com/indygreg/python-build-standalone And how to use the portable pipx.pyz with such a python version? It seems to me that the concept needs to be seriously adjusted ;)

mwriter avatar Aug 12 '24 22:08 mwriter

What is the use case here? You want to be able to choose the Python version because each version may introduce incompatibilities to user libraries, but pip does not have the same user interface that matters.

uranusjr avatar Aug 13 '24 08:08 uranusjr

What is the use case here?

Take any portable version from https://github.com/indygreg/python-build-standalone, take pipx.pyz and show how to use them together.

but pip does not have the same user interface that matters

Yes, but the pipx won't work without it and it's impossible to set up a path to it.

mwriter avatar Aug 13 '24 10:08 mwriter

@uranusjr Oh, you even had a project with a similar idea https://github.com/uranusjr/ouo You just need to develop it to be able to independently set the path to pip

mwriter avatar Aug 13 '24 11:08 mwriter

Take any portable version from https://github.com/indygreg/python-build-standalone, take pipx.pyz and show how to use them together.

We actually have a builtin feature to integrate these standalone Python builds. They're fetched via a CLI option (ref. docs), extracted and cached under $PIPX_HOME/py/<version>. If you absolutely want to, you could also place them there manually.

chrysle avatar Aug 13 '24 11:08 chrysle

They're fetched via a CLI option (ref. docs), extracted and cached under $PIPX_HOME/py/<version>

And where is it described in the documentation?

If you absolutely want to, you could also place them there manually.

And nosystem pip will be picked up automatically? But there is an option to specify the path to the interpreter

--python PYTHON

Why not just do the same for exists nosystem pip path? Why force to change the existing paths?

mwriter avatar Aug 13 '24 12:08 mwriter