I had Python versions of 2.7 and 3.5. I wanted the install a newer version of Python which is python 3.8. I am using Ubuntu 16.04 and I can not just uninstall Python 3.5 due
In my case, removing python-pip-whl package helped:
python-pip-whl
apt-get remove python-pip-whl
It removed also pip and virtualenv, so I had to install them again:
pip
virtualenv
curl https://bootstrap.pypa.io/get-pip.py | python3 pip install virtualenv