How to Upgrade Python NumPy

Muhammad Maisam Abbas Feb 02, 2024
How to Upgrade Python NumPy

This article will introduce the methods to upgrade the NumPy package in Python.

Upgrade Python NumPy

We can upgrade the NumPy package to the latest version by using the pip and pip3 package managers for Python 2 and Python 3, respectively. The command to upgrade the NumPy package is given below.

Update NumPy in Python 2

pip install numpy --upgrade

Update NumPy in Python 3

pip3 install numpy --upgrade

We just need to use one of the above commands depending upon our version of Python. If this command does not work for some reason, or maybe the NumPy package is already installed on our machine but in a different path, we can use the following commands.

for Python 2

pip install numpy --upgrade --ignore-installed

for Python 3

pip3 install numpy --upgrade --ignore-installed

The above commands will forcefully install the latest version of the NumPy package even if there is already a newer version installed on our machine.

Muhammad Maisam Abbas avatar Muhammad Maisam Abbas avatar

Maisam is a highly skilled and motivated Data Scientist. He has over 4 years of experience with Python programming language. He loves solving complex problems and sharing his results on the internet.

LinkedIn