How can I install the latest version of Python 3.7 on Linux Mint along with Idle for it?

Python 2.7 and Python 3.4 are already on the machine. Both were packaged with the distro (Linux Mint). I want to install Python 3.7 and Idle for it and make it the default. I trashed the machine following some guides online and had to restore the machine from an image backup. All is back to where it was but don't want to go though that headache again. Many online guides are dated. When I looked through the software manager, I see a million different things for Python 3.7. Any help would be most appreciated.

Posted Jan 22, 2019, 4:00 PM UTC

57
rymarc•

I don't think Python 3.7 is available in the default repositories for mint.

So, you'll have to download a gzipped of xz tarball from the python website: https://www.python.org/downloads/

After you download and un-compress one of those files (hopefully you know how to do that), just follow the README instructions to install.

After this things gets a little tricky, by default python in Mint refers to Python2, so you should just update your default python3 installation using update-alternatives:

sudo update-alternatives --install /usr/local/bin/python3 /usr/bin/python3.#.#

Replace the #.# based on whatever specific version of python 3.7 you download from the website.

2
toyonut•

Which version of mint?

2
ShiftBitOPLinux Mint 17.x | Cinnamon•

As shown in my flair, 17.1 with cinnamon. Probably upgrading to 19.1 in the near future.

1
epic-warlock•
1
ShiftBitOPLinux Mint 17.x | Cinnamon•

This is guide that trashed my machine.

1
ShiftBitOPLinux Mint 17.x | Cinnamon•

Thanks to all who replied. It is very much appreciated. Still nervous about doing any of these, though. Once bitten, twice shy I guess. Won't do anything until I make another full image backup.

1