How to Change the Pandas Version in Windows

You can change the Pandas version in Windows using this command:

pip install pandas==pandas version needed --user

For example, if the Pandas version needed is 1.1.1, then open the Windows Command Prompt and type/copy the command below:

pip install pandas==1.1.1 --user

Note that the above method would work only if you added Python to Windows path. Don’t worry if you don’t know what it means, as you’ll see the full steps to change the Pandas version in the next section.

Steps to Change the Pandas Version in Windows

(1) To start, open the Windows Command Prompt (you may consider to run the Command Prompt as an administrator to avoid any permission issues).

(2) Locate the Python “Scripts” path, which should be within the folder where you originally installed Python.

Here is an example of a Python Scripts path:

C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

(3) Type “cd” followed by your Python Scripts path:

C:\>cd C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

(4) Press Enter, and you’ll see the following:

C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts>

(5) To change the Pandas version to 1.1.1 for example, you may type the command below and then press Enter:

pip install pandas==1.1.1 --user

This is how the command would look like in the Command Prompt:

C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts>pip install pandas==1.1.1 --user

(6) Once the installation is completed, you’ll see the version of Pandas that you specified:

Successfully installed pandas-1.1.1

Optionally, you can also check the version of Pandas at anytime by opening Python and then typing this syntax:

import pandas as pd
print(pd.__version__)

Run the code, and you’ll see the version of Pandas:

1.1.1

Leave a Comment