When running the system-installed python, I can find pip:
% which python3
/usr/local/bin/python3
% python3 --version
Python 3.9.7
% /usr/local/bin/python3 -m pip --version
pip 21.3.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
However, if I create a virtualenv with this python3
and activate it, then I can no longer find pip
:
% which python3
~/venv/bin/python3
% ls -la `which python3`
~/venv/bin/python3 -> /usr/local/bin/python3
% python3 -m pip --version
~/venv/bin/python3: No module named pip
I am completely baffled by this.
What is it about reading through a symlink that could make pip
disappear?