Use
pyenv then installing new versions and switch between version become very simple.
I have a tutorial of setup pyenv
here.
I want install Python 3.6.2,i have already used 3.6.1 since it come out.
mint@mint ~ $ pyenv install 3.6.2
Downloading Python-3.6.2.tar.xz...
-> https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
Installing Python-3.6.2...
Installed Python-3.6.2 to /home/mint/.pyenv/versions/3.6.2
Setting it as global python.
int@mint ~ $ pyenv global 3.6.2
mint@mint ~ $ python
Python 3.6.2 (default, Jul 20 2017, 14:21:59)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
That's all,and it very safe don't mess up system version of Python.
Say i want to go back to Mint 18.1 default Python versions.
mint@mint ~ $ pyenv local system
mint@mint ~ $ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
mint@mint ~ $ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>