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.
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 fasterconda
alternative)
package manager.
Other options include:
You can install SciPy from PyPI withpip
:
Python -m pip install scipy
You can install SciPy from thedefaults
orconda-forge
channels withconda
:
conda install scipy
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.
Usingapt-get
:
sudo apt-get install Python 3-scipy
Usingdnf
:
sudo dnf install Python 3-scipy
macOS doesn’t have a preinstalled package manager, but you can install Homebrewand use it to install SciPy (and Python itself):
brew install scipy
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.