Installing Python on Ubuntu Linux 16.04
Learn how to install Python 3.7 in Ubuntu 16.04 using the “deadsnakes PPA”, a repository that contains modern Python versions for older Ubuntu installations.
00:00 Installing Python on Ubuntu 16.04. Here’s the Ubuntu desktop. Right-clicking and Open Terminal will allow you to check which versions of Python are installed.
00:13
Typing python --version
will check the Python 2 version, and typing python3 --version
allows you to check the Python 3 version that’s installed, if any. And here you can say it’s Python 3.5.2
, which is a little out of date. Let’s change that.
00:33
The first step is to add a new repository with a sudo add-apt-repository
command, and then adding ppa:deadsnakes/ppa
. This is a repository with modern versions of Python available for older versions of Ubuntu. So you can see here, we get some information about it, and hitting Enter will allow your system to use that repository to install software. Next, the catalog of software needs to be updated with the apt-get update
command. It just takes a few seconds.
01:11
Once that’s done, Python can be installed with the command sudo apt-get install python3.7 idle-python3.7
.
01:29
Hit y
to continue, and then the software will be downloaded automatically and installed.
01:39
The command to run IDLE on this version is idle-python3.7
. Now IDLE is launched, and you’re ready to start programming.
Darren Jones RP Team on Dec. 15, 2020
Which version of macOS are you running?
Become a Member to join the conversation.
amirrastkhadiv on Dec. 8, 2020
Hi, I had Python 3.7.6 in my macOS, I updated that from www.python.org/downloads/release/python-391/ . When I check the version python –version in terminal the system shows Python 3.7.6 ,however, when I type python3 –version it shows: Python 3.9.1. Why? I wonder to know why it kept the old version? How can I uninstall the old version of Python3 from my macOs please?