I'm trying to install pip2 on a Linux Mint computer, with pip3 already installed in /.local/lib/python3.6/site-packages. I also have both Python 2.7 and Python 3.7 already installed:
$ python -V
Python 2.7.15+
$ python3 -V
Python 3.6.9
But when I try to install pip2, it gives the following error:
$ python get-pip.py
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
Running the command python3 opens the python shell as normal, but running the command python gives the same error. Neither $PYTHONHOME or $PYTHONPATH have been set. Can someone please explain to me how I can resolve this issue?
Edit: I am not using a virtual env. Running apt-get check python2 does not show any broken dependencies. When I set PYTHONHOME to be /usr, the python3 command still opens the shell, but the python and python2 commands give ImportError: No module named site