mattsb42-meta/pipx-in-pipx

pipx installed pipx python points to exact path of interpretter

mattsb42-aws opened this issue · 1 comments

When pipipxx is pip installed, the pipx installed pipx install python symlink points to the exact filepath of the interpretter used when pip install is called.

This causes problems because this file might not exist when the python used pip install pipipxx is updated.

ex:

ls -l `which python3`
/usr/bin/python3 -> /..path..to..brew..stuff../3.7.3/bin/python

The python symlink in the pipx installed pipx environment points to the exact 3.7.3 brew installed python. This then breaks when brew updates python and removes the old files.

Instead, pipipxx should use the path of the file called with pip install rather than the path of the file executed.

Another option here would be to use symlinks=False when creating the venv, and just let it copy the interpreter instead of linking it. That would make the pipx install more independent and robust.

If I go this route, I will need to determine the right approach for upgrading that runtime (maybe just pix uninstall pipx && pip install pipipxx?)