Installing NumPy

Tip

This page assumes you are comfortable using a terminal and are familiar with package managers. The only prerequisite for installing NumPy is Python itself. If you don’t have Python yet and want the simplest way to get started, we recommend you use the Anaconda Distribution - it includes Python, NumPy, and many other commonly used packages for scientific computing and data science.

The recommended method of installing NumPy depends on your preferred workflow. Below, we break down the installation methods into the following categories:

  • Project-based (e.g., uv, pixi) (recommended for new users)
  • Environment-based (e.g., pip, conda) (the traditional workflow)
  • System package managers (not recommended for most users)
  • Building from source (for advanced users and development purposes)

Choose the method that best suits your needs. If you’re unsure, start with the Environment-based method using conda or pip.

Below are the different methods for installing NumPy. Click on the tabs to explore each method:

Recommended for new users who want a streamlined workflow.

  • uv: A modern Python package manager designed for speed and simplicity.

    uv pip install numpy
  • pixi: A cross-platform package manager for Python and other languages.

    pixi add numpy

Verifying the Installation#

After installing NumPy, verify the installation by running the following in a Python shell or script:

import numpy as np print(np.__version__)

This should print the installed version of NumPy without errors.

Troubleshooting#

If your installation fails with the message below, see Troubleshooting ImportError.

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. This error can happen for different reasons, often due to issues with your setup.
On this page
Verifying the Installation#
Troubleshooting#