Installation

Installations methods include:

Methods differ in ease of use, coverage, maintenance of old versions, system-wide versus local environment use, and control. With pip or Anaconda's conda, you can control the package versions for a specific project to prevent conflicts. Conda also controls non-Python packages, like MKL or HDF5. System package managers, likeapt-get,install across the entire computer, often have older versions, and don't have as many available versions. Source compilation is much more difficult but is necessary for debugging and development. If you don't know which installation method you need or prefer, we recommend the Scientific Python DistributionAnaconda.

Scientific Python Distributions (recommended)#

Python distributions provide the language itself, along with the most commonly used packages and tools. These downloadable files require little configuration, work on almost all setups, and provide all the commonly used scientific Python tools.

Anacondaworks on Windows, Mac, and Linux, provides over 1,500 Python packages, and is used by over 15 million people. Anaconda is best suited to beginning users; it provides a large collection of libraries all in one.

For more advanced users who will need to install or upgrade regularly, Mambaforgeis a more suitable way to install theconda(andmamba,a fastercondaalternative) package manager.

Other options include:

  • WinPython:Another free distribution including scientific packages and the Spyder IDE; Windows only, but more actively maintained and supports the latest Python 3 versions.
  • Pyzo:A free distribution based on Anaconda and the IEP interactive development environment; Supports Linux, Windows, and Mac.

Installing with Pip#

You can install SciPy from PyPI withpip:

Python -m pip install scipy

Installing via Conda#

You can install SciPy from thedefaultsorconda-forgechannels withconda:

conda install scipy

Install system-wide via a package manager#

System package managers can install the most common Python packages. They install packages for the entire computer, often use older versions, and don’t have as many available versions.

Ubuntu and Debian#

Usingapt-get:

sudo apt-get install Python 3-scipy

Fedora#

Usingdnf:

sudo dnf install Python 3-scipy

macOS#

macOS doesn’t have a preinstalled package manager, but you can install Homebrewand use it to install SciPy (and Python itself):

brew install scipy

Source packages#

A word of warning: building SciPy from source can be a nontrivial exercise. We recommend using binaries instead if those are available for your platform. For details on how to build from source, see this guide in the SciPy docs.

On this page