Installation

Tip

This page assumes that you are comfortable with using a terminal and happy to learn how to use a package manager. If you are a beginner and just want to get started with SciPy as quickly as possible, check out the beginner installation guide!

The recommended method of installing SciPy depends on your preferred workflow. The common workflows can roughly be broken down 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)
  • Building from source (for debugging and development)

To install SciPy with static type stubs, see Installing with type stubs.

Tip

Installing type stubs may be required for Interactive Development Environments (IDEs) to provide accurate type hints.

Installing with uv#

Here is a step-by-step guide to setting up a project to use SciPy, with uv, a Python package manager.

  1. Install uv following, the instructions in the uv documentation.

  2. Create a new project in a new subdirectory, by executing the following in a terminal:

uv init try-scipy cd try-scipy
Hint

The second command changes directory into the directory of your project.

  1. Add SciPy to your project:
uv add scipy
Note

This will automatically install Python if you don’t already have it installed!

Tip

You can install other Python libraries in the same way, e.g.

uv add matplotlib

  1. Try out SciPy!
uv run python

This will launch a Python interpreter session, from which you can import scipy.

See next steps in the SciPy user guide.

Note

After rebooting your computer, you’ll want to navigate to your try-scipy project directory and execute uv run python to drop back into a Python interpreter with SciPy importable. To execute a Python script, you can use uv run myscript.py.

Read more at the uv guide to working on projects.

Installing with pixi#

If you work with non-Python packages, you may prefer to install SciPy as a Conda package, so that you can use the same workflow for packages which are not available on PyPI, the Python Package Index. Conda can manage packages in any language, so you can use it to install Python itself, compilers, and other languages.

The steps to install SciPy from conda-forge using the package management tool pixi are very similar to the steps for uv:

  1. Install pixi, following the instructions in the pixi documentation.
  1. Create a new project in a new subdirectory:
pixi init try-scipy cd try-scipy
  1. Add SciPy to your project:
pixi add scipy
  1. Try out SciPy!
pixi run python

See next steps in the SciPy user guide.

Installing with Type Stubs#

Static type stubs are available via a separate package, scipy-stubs, on PyPI and conda-forge. You can also install SciPy and scipy-stubs as a single package, via the scipy-stubs[scipy] extra on PyPI, or the scipy-typed package on conda-forge. To get a specific version x.y.z of SciPy (such as 1.14.1), you should install version x.y.z.*, for example:

uv add "scipy-stubs[scipy]==1.14.1.*" # or pixi add "scipy-typed=1.15.0.*" # or python -m pip install "scipy-stubs[scipy]" # or conda install "scipy-typed>=1.14"

Please direct questions about static typing support to the scipy-stubs GitHub repository.

On this page
Installing with Type Stubs#