How to Install scipy in Python
Fundamental algorithms for scientific computing in Python
pip install scipy
What is scipy?
Fundamental algorithms for scientific computing in Python
SciPy (pronounced "Sigh Pie") is an open-source software for mathematics, science, and engineering. It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and more.
SciPy is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines, such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!
For the installation instructions, see `our install guide `.
Quick Start
Minimal example to get started with scipy:
from scipy import stats
import numpy as np
data = np.array([2.1, 2.5, 2.9, 3.1, 3.5, 3.9, 4.2])
t_stat, p_value = stats.ttest_1samp(data, popmean=3.0)
print(f"t={t_stat:.3f}, p={p_value:.3f}")
Installation
pip (standard)
pip install scipy
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install scipy
pip3
pip3 install scipy
conda
conda install -c conda-forge scipy
Poetry
poetry add scipy
Dependencies
Installing scipy will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import scipy; print(scipy.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing scipy with pip.
ModuleNotFoundError: No module named 'scipy'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install scipy. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'scipy' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install scipy to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'scipy'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show scipy and upgrade with pip install --upgrade scipy.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install scipy. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user scipy
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org scipy
MemoryError when loading data
Cause: Dataset is too large to fit in RAM.
Fix: Read in chunks, filter columns on load, or consider Polars/Dask for out-of-core processing.
Recent Releases
| Version | Released |
|---|---|
1.17.1 latest |
2026-02-23 |
1.17.0 |
2026-01-10 |
1.17.0rc2 |
2025-12-30 |
1.17.0rc1 |
2025-12-09 |
1.16.3 |
2025-10-28 |
Manage scipy
Upgrade to latest version
pip install --upgrade scipy
Install a specific version
pip install scipy==1.17.1
Uninstall
pip uninstall scipy
Check what is installed
pip show scipy