Using Ubuntu 17.04. After update Python 3.5 to 3.6 via terminal according to still showing that version is 3.5.3.

~$ python3 --version
Python 3.5.3

How is this installed?

  • 1
    How did you update it? – edwinksl Jun 6 '17 at 23:53
  • Then you call it using python3.6. python3 will remain symlinked to python3.5 and you should keep it that way. Look into virtual environments like Oli wrote in his answer. – edwinksl Jun 7 '17 at 0:41
  • Thanx, now I`ve to find out how to use virtualenv. – Stanislav Voloshchuk Jun 7 '17 at 0:47
up vote 5 down vote accepted

How did you upgrade? I suspect you may have a python3.6 binary somewhere.

Generally speaking, you never want to replace /usr/bin/python or /usr/bin/python3 with your own fruity versions. Important parts of Ubuntu require their stable Python environments, and largely speaking, that is incompatible with you mucking around.

That all said, having a /usr/bin/python3.6 (or /usr/local/bin/python3.6, or whatever in your path) would be fine. If you don't want to type all that in each time, you might want to look at virtualenv and the various wrapper automation options for it. This has the additional bonus of not threatening your system's site_packages with your development work.

I had the same problem, I did the following instruction to resolve it:

After install python3.6:

To make python3 use the new installed python 3.6 instead of the default 3.5 release, run following 2 commands:

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

Finally, switch between the two python versions for python3 via command:

sudo update-alternatives --config python3

Then select the /usr/bin/python3.6 -- automode in choices menu, for me that was 0 row.


$ python3 -V
Python 3.6.6


$ python3 --version
Python 3.6.6

Installing and upgrading to Python3.6 requires the command

sudo apt-get upgrade python3.6

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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