Installing Python on Linux

Many Linux machines have both Python 2 and Python 3 pre-installed. To find out, search for the “Terminal” program on your computer and open it up.

Inside the terminal, type out python --version and press enter. If you see the result of: Python 2.7.10 from now on you may need to add the number 3 to the end of python when you run commands in the terminal.

Next, try typing in python3 --version and pressing enter. Hopefully, you’ll see something that indicates a version of Python 3 such as Python 3.5.2.

If this works, and you see a version of Python starting with 3, you’re good to go! If it doesn’t, you’ll need to install Python 3 manually on your Linux machine. This process varies widely depending on your Linux distribution so you should search for guides on installing Python 3 specifically for your distribution.

Technically, you will be using a slightly different version of Python than the other installation processes, but it should behave the same for the demos that we’ll do here.