I tried the method suggested here for installing virtualenv. However, it gives a confusing error on Ubuntu 16:
% /usr/bin/python2.7 -m pip install virtualenv
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages/94/d7/adb787076e65dc99ef057e0118e25becf80dd05233ef4c86f07aa35f6492/virtualenv-20.25.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-toC2d7/virtualenv/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-toC2d7/virtualenv/
I already have some virtualenv installed; I tried removing it as suggested here but that also doesn't work:
% pip uninstall virtualenv
Cannot uninstall requirement virtualenv, not installed
How can I install virtualenv for Python 2.7?