1. Overview

In this tutorial, we'll learn how to install Pandas and Python on Windows. We will cover the most popular ways of installation.

The instructions described below have been tested on Windows 7 and 20.

2. Install Python on Windows 10

Python is a widely-used easy to learn, user friendly, concise and high-level programming language. It is very easy to start coding on it and has a huge community.

Python is one of the most liked and wanted languages according to: stackoverflow - Python is the most wanted language for its fifth-year

2.1. Download and Install Python on Windows

Unlike Linux, Windows doesn't come with a pre-installed Python version.

So if we want to use the latest version of Python then manual installation is the way to go. The steps to install Python on Windows are:

  1. Go to Python Releases for Windows
  2. Select the Python version you like - I prefer to go with the Stable Releases. For example - Python 3.9.10 - Jan. 14, 2022
  3. Select the type of the installation - I prefer Download Windows installer (64-bit) - python-3.9.10-amd64.exe
  4. Download the desired version
  5. Run the Python Installer
  6. During installation
    6.1. Select Install launcher for all users - if you like to have it for all users
    6.2. Check Add Python 3.9 to PATH in order Python to be visible for other programs
  7. Press Install Now
  8. Finally you can verify the installation by checking the version - Python -V - expected output - Python 3.9.10

2.2. Create a virtual environment (optional)

Python offers a powerful package system venv which helps separate different Python packages. In simple words, you can create several virtual environments in multiple Pandas versions:

  • pandas 1.3.4
  • pandas 1.0.0

To create new virtual environment called pandas1:

  • create folder for your virtual environments ( or select existing one)
  • Run command: python -m venv pandas1
  • activate the environment by:
cd pandas1
source bin/activate

Once environment is activated you will see change in the terminal:

(pandas1) $ deactivate

The command above deactivates the environment.

To learn more please check:

2.3. Install PIP (optional)

PIP is one of the most popular package managers for Python. If it's not installed:

pip -V

will return message that the command is not recognized - then you can install it by:

py -m ensurepip --upgrade

To learn more please check:

3. Install Pandas on Windows

3.1. Install Pandas by Pypi

Next step is to install Pandas on Windows. The most easiest way of installing Pandas is by running:

pip install pandas

You can find more information for Pandas on: pandas - pypi.org.

3.2. Install Anaconda and Pandas on Windows

If you like to use alternative installation methods you can check the official docs: Installing Anaconda on Windows.

For example Pandas is part of Anaconda - so if you install Anaconda on your system you will get Pandas:

  • download the Anaconda installer for Windows

  • Verify data integrity with SHA-256. (optional but highly RECOMMENDED step)

  • Install Anaconda by double click on the installer

  • Press Next

  • "I Agree" on - licensing terms

  • Select "Just Me" - if you are going to use it for yourself only

  • Select a destination folder

  • Click the Next button

  • Add "Anaconda to your PATH environment variable" - highly recommended

  • Continue the rest depending on your personal preferences or refer to the official installation guide

3.3. Verify Pandas installation

Finally you can test Pandas installation by running next commands:

pip freeze | grep pandas

result will be:

pandas==1.4.0

4. Conclusion

To summarize, in this article, we've seen examples of installing Python and Pandas on Windows in several ways. We've briefly explained these installation methods and how to verify the installation.

And finally, we've seen how to manage multiple Python/Pandas installations on Windows like systems with different package versions.