This post show how to install and run python on Ubuntu Linux system or Mac OS system. It covers python3.

Installing and running

If you are using Linux, python3 is probably already installed on your system. Type the following to check:

which python3

If you don’t have it installed, the command to install on Ubuntu is:

sudo apt-get install python3
sudo apt-get install python-pip3

On mac,

brew install python3
brew install pip3

To check if the python3 and pip3 was installed,

which python3
which pip3

To run a python program, simply type python3 and the file you want to run.

python3 hello.py

By master