Python 3 Installation & Setup Guide for Windows System
Windows system doesn’t come shipped with Python. Since it doesn’t come preloaded, you got to download Python installer from Python.org website & running it.
Step 1: Download the Python 3 Installer
- Open Download page for Windows at python.org.
- Select Python Releases for Windows, click on the link for the Latest Python 3 Release – Python 3.x.x.
- Scroll to the bottom and select either Windows x86-64 executable installer for 64-bit or Windows x86 executable installer for 32-bit.
Not sure of selecting 32-bit or 64-bit installer version – If your operating system has a 32-bit processor, then you should choose the 32-bit installer.64-bit system performs better for applications with intensive computation. It will work for most purposes.
Step 2: Run the Installer
Locate the installer once downloaded and run it double-clicking on the downloaded file. A dialogue will appear something like this. Before you hit next, ensure you select Add Python 3.x to PATH. This option ensures interpreter will set up in your execution path and you do not have to configure it manually.
macOS / Mac OS X
The best way to install Python on Mac OS X or macOS is via Homebrew package manager.
Step 1: Install the Homebrew package manager via command line dev tools
a. Open the browser and navigate to http://brew.sh/ . Select the Homebrew bootstrap code under “Install Homebrew”.
b. Using Cmd+C copy the bootstrap code to clipboard. Please do ensure the text of complete command was selected else installation process will fail.
c. If you’re doing this on a fresh install of macOS, you may get a pop up an alert asking you to install Apple’s “command line developer tools”. You’ll need those to continue with the installation, so please confirm the dialogue box by clicking on “Install”.
It will take few minutes for command-line developer tool to finish installing.
Step 2: Install Homebrew
- Open the Terminal, hit Enter to continue with Homebrew installation.
- During the final stages of installation, you will be asked to enter your User password. Hit enter to continue.
- Depending on your internet connection, it takes a few minutes to download the required files.
- Once the installation process is complete, you will end up at command prompt in the terminal window.
Step 3: Install Python
Run the following command brew install python3 in your Terminal. This command will download and install the latest version of Python.
You can make sure everything went correctly by testing if Python can be accessed from the Terminal:
- Open the Terminal by launching Terminal .app.
- Type pip3 and hit Enter.
- You should see the help text from Python’s “Pip” package manager. If you get an error message running pip3, go through the Python install steps again to make sure you have a working Python installation.
Online Python Interpreters
If you want to try out the examples in this tutorial without installing Python on your machine, there are several web sites available where you can interact with a Python interpreter online. Please note these cloud based Python interpreters will able to execute simple ones and that’s nice way to get started.