I use Ubuntu 16.04 at work, and the machine is managed by the IT department. (i.e. I cannot use sudo)

The other day I asked them to install different python version (3.7 and 3.8 specifically), but they were so concerned to destroy the system that I was told to use Anaconda.

But I thought packages, installed by apt, that uses python wouldn't be affected by merely installing different versions of Python via apt, as python and python3 wouldn't point to different version. Not having enough knowledge on Linux's package management, however, I am not sure my assumption is true.

Could anyone "prove" installing different python version won't interfere with the system?

  • 1
    Why not install Python as local user?
    – Murphy
    Commented Feb 2, 2020 at 14:34
  • 1
    "wouldn't point to different version"? You seem to have a negation here. Commented Feb 2, 2020 at 16:30
  • 2
    It may break badly written scripts created by your organisation. The debian alternatives system should be set up to make python point to python2. That way old scripts should continue to work. Commented Feb 2, 2020 at 16:33
  • I'm aware of other choices such as build from source and use make altinstall. My thought is that apt provides safety that different versions of python can "co-exist", provided symlinks aren't changed and python was installed by nothing but apt. I would like to confirm that.
    – kh_0828
    Commented Feb 2, 2020 at 22:31

2 Answers 2


Python is used extensively by all sorts of system adminstration tasks. Python 3 is quite incompatible with Python 2 (Fedora is finishing the painful process of porting everything over). Just replacing a critical package "because I, user, want a new version" won't fly, sorry. If the distribution isn't set up to run both side by side, you are out of luck (if it's your own machine, go wild; if it explodes, you get to keep the mess).

If you require it, install it (and any packages you need) in your home directory.

  • 1
    Installing newer versions of Python3 on top of the existing one, which is 3.5, won't break the system dependency (i.e. what /usr/bin/python3 is symlinked to), would it? That way I thought ubuntu was capable of running multiple python versions side by side.
    – kh_0828
    Commented Feb 3, 2020 at 3:10
  • @kh_0828, OP asks for proof.
    – vonbrand
    Commented Feb 5, 2020 at 12:46

straight to the point, you can safely ask to install pyenv, so far the best option (and easy to setup per-user, per-folder) to test different python versions (also ankward setups like different python 3.8.x-z minor release at the same moment)

Actually I use it to run both old code (python 2.6) that needs to be updated, and fresh code already on 3.8.x libs, without touching system installation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .