NEPTUNIAN ANALYTICS

How to Install Python on Windows

Are you interested in beginning your Python programming journey? Or an experienced Python programmer looking to download Python onto your device? This tutorial gives a background into Python and shows how to download Python for Windows devices through the Python website, Anaconda or Miniconda.

Introduction to Python

Python is a high-level, general-purpose programming language developed by Guido Van Rossum and first released in 1991. The language was named after the sketch comedy Monty Python's Flying Circus. Python's development was heavily influenced by the two programming languages ABC and Modula-3, with Python being developed to be an easily readable and reusable programming language.

In 2000, Python 2 was released with new features such as Unicode strings and list comprehensions. In 2008, Python 3 (the current edition of Python) was released. The release of Python 3 resulted in some significant syntax changes. For example, the print statement was replaced with a print() function, and the ordering comparison operators would now raise an error when the items being compared lacked a natural order. Python 3 was released with the leading goal of reducing feature duplication, which was to be achieved by removing the historical ways of performing tasks. Today, Python is used in a wide variety of fields, such as web app development, data analysis and visualisation and machine learning. A study conducted by Statista reveals Python to be amongst the most popular programming languages. So let's get started!

Do you Have Python 3 Installed Already?

Before we attempt to install Python, check if you already have Python 3 installed on your device. There are a few different ways to search for Python on your device. Let's start with seeing if you can run Python commands from the command-line.

Command-line

To check if you have Python installed enter the statement below into a command tool such as command prompt or Windows PowerShell.
py --version
If you can access Python from the command-line, you should get something like Python 3.x (the 'x' refers to the Python version). If not, check the methods below as you may still have Python installed.

Python Installation Directory

When installing Python from the website, the file is typically installed under this path: C:\Users\YourUsername\AppData\Local\Programs\Python\Pythonx. To see if you can find Python in your files, enter this path into your Windows File Explorer (replacing YourUsername with the user name for your device): C:\Users\YourUsername\AppData\Local\Programs\Python\. If you have Python 3 installed under this path, you should find a Python 3x folder.

Windows Search Bar

Finally, the last method to see if you have Python installed on your device that will be explored in this tutorial is using the Windows search bar. Go to your Windows search bar and type 'python'. If you have Python installed, you should see Python 3.x (32-bit) or Python 3.x (64-bit). If not, proceed to the next section to see how to install Python.

Installing Python

There are many ways to download Python onto Windows devices. This tutorial will discuss downloading Python from:

  • The Python Website: This is a quick and easy way to install the most up-to-date Python. Downloading Python from the website also comes with the package manager pip.
  • Using Anaconda: This is a Python distribution that comes with a suite of scientific computing packages and a graphical user interface called Anaconda Navigator. Downloading Python through Anaconda also downloads pip and another package manager named Conda.
  • Using Minconda: This is another Python distribution; Miniconda is a smaller version of Anaconda that doesn't come with as many packages as Anaconda, nor does it come automatically installed with Anaconda Navigator, but it does come with pip and Conda.

Those who prefer using a GUI to a command-line interface and want to use Python for data analysis will benefit from downloading Python via Anaconda, as it comes with a graphical user interface and a set of automatically installed scientific computing packages. Whereas those wanting to avoid taking up a lot of memory on their computer may prefer using Miniconda or the Python Website.

After downloading Python go back to Do you Have Python 3 Installed Already? and follow the steps to see if Python is now installed.

The Python Website

  • Python for Windows can be downloaded here.
  • Download the Windows installer (64-bit) or Windows installer (32-bit) for the latest stable release. At the time of writing, this was Python 3.12.1.
    • The difference between the 64-bit and 32-bit Python is that the 64-bit Python can access much more memory. It is advisable to use the 64-bit version of Python, especially if you plan to use large datasets as the large datasets will benefit from additional memory availability.
  • Once you have finished downloading Python, open the Python file in your downloads.
  • At the bottom there will be the option to 'Add python.exe to PATH'. If this is the only Python version you plan to install and you want to be able to access Python from the command-line, then check this box. Otherwise, do not.
  • You will also be given the option to either 'Install Now' or 'Customize installation'. Unless you have specific installation requirements and want to customise your installation, click 'Install Now'.
  • Once Python has finished downloading you should see 'Setup was successful'. On this page, there will be some links to Python. You may find some of these links, especially 'online tutorial' helpful for learning Python.
  • Below will also be the option to disable the path length limit. This refers to the number of characters that a file path can be. For general Python use, it is not necessary to disable the path length limit.
  • Now that you are finished, you can click the 'Close' button.

Installing Anaconda

Anaconda is an open-source Python (and R) data science distribution. Downloading Anaconda will download Python and a suite of scientific computing packages automatically. In addition, Anaconda comes with Anaconda Navigator – a graphical user interface that can manage Python packages without having to use a command-line interface.

Downloading Anaconda is helpful for those who are new to Python and want to use the language for analysis and those who prefer using a GUI to a command-line interface. However, it is essential to note that Anaconda does take up a lot of memory. Follow below for how to install Anaconda.

  • Anaconda can be downloaded here.
  • Download the Windows 64-Bit Graphical Installer.
  • Once you have finished downloading Anaconda, open the Anaconda file in your downloads.
  • At first, you will receive a welcome to Anaconda 3 setup; click next to continue.
  • Read the terms of the licencing agreement, and if you are happy, click 'I Agree'.
  • Decide your installation type; you can install for 'Just Me', which will install for the current user account or 'All Users', which will install for all user accounts. Unless you are using a computer with multiple users and need to install Anaconda for all of them, click 'Just Me' and press next.
  • Choose your install location; the default path is typically C:\Users\YourUsername\anaconda3. You can change this if you would like. However, it would be preferable to keep the default path. Click next.
  • For 'Advanced Installation Options', there will be an option to 'Create start menu shortcuts'; this can allow packages to add a shortcut to the Windows start menu if you would like.
  • There is also the option to add Anaconda3 to your PATH environment variable. It's important to note that with the Graphical Installer, you will have a GUI to execute tasks. However, if this is the only Python version you plan to install and you want to be able to access Python from the command-line, then check this box. Otherwise, do not.
  • Another advanced installation option is registering Anaconda3 as your default Python 3.x; this option will allow other Python tools to automatically detect Anaconda3 as the primary Python version. However, if you have multiple versions of Python or plan to install multiple versions of Python do not check this box.
  • The final advanced installation option is to 'Clear the package cache upon completion'; this refers to whether you want to delete the downloaded package files from the cache once installation is complete.
    • A package cache stores data to help speed up future installations or updates. However, clearing the package cache can help to clear disk space. If you clear the package cache after installation, future installations and updates will download the package archives again.
  • Once you are satisfied with your advanced installation selections, click 'Install'.
  • Once the installation is finished, you should see 'Installation Complete'; click next.
  • Here, you will be informed about Anaconda Notebooks; click next.
  • Finally, you will be greeted with some helpful resources to get you started with Anaconda. Keep the boxes checked if you want to launch those links. Then press finish.

Installing Miniconda

Miniconda is a smaller version of Anaconda. Miniconda comes with Python, but it does not contain as many packages as Anaconda, nor does it come with the Anaconda Navigator automatically (upon installing Miniconda, the Anaconda Navigator can be downloaded later). This makes Miniconda suitable for those who want to save memory on their computer or who know exactly what packages they want to download. Follow below for how to install Miniconda.

  • Miniconda can be downloaded here.
  • At the top of this webpage you can find some more information about Miniconda. Scroll down the page until you get to 'Latest Miniconda installer links'. Download Minconda3 Windows 64-bit.
  • Once you have finished downloading Miniconda open the file from your downloads.
  • At first, you will receive a welcome to Miniconda3 setup; click next.
  • Read the terms of the licencing agreement, and if you are happy, click 'I Agree'.
  • Decide your installation type; you can install for 'Just Me' which will install for the current user account or 'All Users' which will install for all user accounts. Unless you are using a computer with multiple users and need to install Miniconda for all of them, click 'Just Me' and press next.
  • Choose your install location; the default path for Miniconda is typically C:\Users\YourUsername\miniconda3. You can change this if you would like. However, it would be preferable to keep the default path. Click next.
  • For 'Advanced Installation Options' there will be an option to 'Create start menu shortcuts'; this can allow packages to add a shortcut to the Windows start menu if you would like.
  • There is also the option to add Miniconda3 to your PATH environment variable. If this is the only Python version you plan to install and you want to be able to access Python from the command-line then check this box. Otherwise, do not.
  • Another advanced installation option is registering Miniconda3 as your default Python 3.x; this option will allow other Python tools to automatically detect Mininconda3 as the primary Python version. However, if you have multiple versions of Python or plan to install multiple versions of Python, do not check this box.
  • The final advanced installation option is to 'Clear the package cache upon completion'; this refers to whether you want to delete the downloaded package files from the cache once the installation is complete.
    • A package cache stores data to help speed up future installations or updates. However, clearing the package cache can help to clear disk space. If you clear the package cache after installation, future installations and updates will download the package archives again.
  • Once you are satisfied with your advanced installation selections, click install.
  • Once the installation is finished, you should see 'Installation Complete'; click next.
  • Finally, you will be greeted with some helpful resources to get you started with Anaconda. Keep the boxes checked if you want to launch those links. Then press finish.

Conclusion

We hope you enjoyed the tutorial on installing Python on Windows devices! If you are new to Python, check Introduction to Python Course for an introduction to Python programming fundamentals.