What is the best way to manage multiple versions of Python on a Linux machine?
On my Linux Mint machine at the office, I have:
- Python 3.4, system installation (installed with the distro)
- Python 2.7, system installation (installed with the distro)
- Python 3.5, with make altinstall
I never install packages to the system python versions (or even upgrade them). I just create a virtualenv and install them there.
I did do "sudo pip" for a few packages in the python 3.5 altinstall installation though:
- virtualenv
- iPython + jupyter
- pytest
- coverage
- pylint
The rest I just install to the virtualenvs of my projects.
Do you consider this a good practice, despite "sudo pip" being highly unrecommended?