How to install numpy in Python?

There are two common ways to install NumPy in Python.

  1. Install NumPy using pip: type the following command in the command line to install NumPy.
pip install numpy
  1. To install NumPy using Anaconda: If you are using Anaconda as your Python distribution, you can use Anaconda’s package manager, conda, to install NumPy. Simply input the following command in the command line.
conda install numpy

No matter which method you choose to install NumPy, you can import the NumPy module in Python using the command “import numpy”.

bannerAds