In Loki when I type python --version i get 2.7.

I want to remove Python 2.7 kompletely and install instead Python 3 how to do that?

  • 1
    please don't do that, most of ñinux packages uses python2 for installing things, removing it will cause several problems Commented Jun 24, 2017 at 20:17

1 Answer 1


I have seen that done before (2.7 replacing 2.4) and things didn't go really well. As @Renato A. has mentioned, lots of Linux packages uses Python 2. You can check the files on /bin or /usr/bin and see that some of them are actually just Python scripts or in some manner pointing to one.

It's not obvious but scripts that are made for Python 2 won't necessarily work on Python 3. Python 3 intentionally has no backwards compatibility.

You can always install Python 3 alongside with Python 2 and just call python3 instead of python whenever you need it.

  • I just got some problems with Python2 and Python3 globally. I tried to install sphinx and got error. Now I use virtualenv and everything is ok. I thouth that Ubuntu 16.04 switched to python3 by default but it doesn't seem so.
    – vrcmr
    Commented Jun 25, 2017 at 9:29
  • virtualenv is the way to go. I don't think we'll get Python3 as default on the next few Ubuntu releases as they are completely dependent on the individual developers' decision to migrate to Python3. Commented Jun 25, 2017 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.