Before you start writing Python programs, you’ll need to download and install a copy of Python.
To begin you need to install Python. You may already have Python installed on your system/machine. Many PCs and Macs will have python already installed.
To check if you have python installed on a Windows PC, search in the start bar for Python or run the following on the Command Line (cmd).
If you don’t know how to find cmd follow these steps >>
- Click on the start menu
- İn the search type cmd
You should find something like this:
Click on it. It opens a black box. It’s called the Command-Line or cmd for short.
Next > Type python and press enter
ıf you see a version number and a prompt, then you are good to go.
But if you receive an error, then you will need to download and install Python.
You can download Python from the official Python download page.
- Go to the site https://www.python.org
- Click on the Downloads
There are different versions of Python. Depending on when you read this tutorial and visit the site, you may see different version numbers than the ones displayed here.
I’d recommend you install the latest version. Unless you have a reason to use an earlier version.
The exact steps here will depend on your operating system.
In Windows and macOS, double-click on the installer and follow the prompts.
Be sure to check Add Python 3.7 to PATH .
You’ll only see this option on Windows, as the Mac installer does it automatically.
Check your Installation
To check that Python 3 was installed, open your terminal (or command prompt on Windows), and type the following:
Anyhow, running this code will launch Python. So if Python 3 was successfully installed, you’ll see a version number and a prompt