How to Install the NumPy Package in Python

You can install the NumPy package by typing this command in the Command Prompt or terminal:

pip install numpy

Note that the above command would only work if you added Python to the Path. Otherwise, check the steps below to install the NumPy package in Python.

Steps to Install NumPy on Windows

(1) Locate the Python Scripts folder by following these steps:

  • Type “Python” in the Windows Search Bar
  • Right-click on the Python App, and then select “Open file location
  • Right-click again on the Python shortcut, and then select “Open file location
  • Double-click on the “Scripts” folder

(2) In the address bar of the Scripts folder (where the path of the folder is displayed), type “cmd“:

cmd

(3) Press Enter, and you’ll see the Command Prompt pointing the Scripts folder:

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

(4) Type the command to install the NumPy package:

pip install numpy

(5) Press Enter to complete the installation:

Successfully installed numpy-1.26.1