Installing PlasmaPy
Note
If you would like to contribute to PlasmaPy, please check out our handy Contributor Guide. 🌱
Installing Python
PlasmaPy requires a version of Python between 3.12 and 3.14. If you do not have Python installed already, here are the instructions to download Python and install it. 🐍
Note
PlasmaPy versions through v2025.8.0 require Python 3.13 or
earlier and are incompatible with Python 3.14 (#3123).
Installing PlasmaPy with pip
To install the most recent release of PlasmaPy on PyPI with pip into an existing Python 3.12+ environment on macOS or Linux, open a terminal and run:
python -m pip install plasmapy
On some systems, it might be necessary to specify the Python version
number by using python3, python3.12, python3.13,
or python3.14 instead of python.
To install PlasmaPy on Windows, run:
py -3.14 -m pip install plasmapy
For more detailed information, please refer to this tutorial on installing packages.
Installing PlasmaPy with uv
uv is “an extremely fast Python package and project manager, written in Rust”. uv lets us create and switch between Python environments that are isolated from each other and the system’s Python installation. In addition, uv provides a pip drop-in interface for common pip commands so that Python packages on PyPI may be installed into uv-managed virtual environments without installing pip.
After installing uv, a virtual environment with Python version 3.14 can be created by opening a terminal and running:
uv venv --python 3.14
uv will automatically download Python and link it to
the virtual environment’s directory at (by default) .venv. The
environment can then be activated by running:
source .venv/bin/activate
Then, to install PlasmaPy into the activated environment, run:
uv pip install plasmapy
Installing PlasmaPy with Conda
Conda is an open source package and environment manager. After installing Conda or miniconda, PlasmaPy can be installed into an activated Conda environment by opening a terminal and running:
conda install -c conda-forge plasmapy
Here -c conda-forge indicates that PlasmaPy should be installed
from the conda-forge channel.
To install PlasmaPy into another existing Conda environment, append
-n env_name to the previous command, where env_name
is replaced with the name of the environment.
To create a new environment with PlasmaPy installed in it, run:
conda create -n env_name -c conda-forge plasmapy
where env_name is replaced by the name of the environment.
This step may take several minutes. To activate this environment, run:
conda activate env_name
To update PlasmaPy to the most recent version within a currently activated Conda environment, run:
conda update plasmapy
Tip
Creating a Conda environment can sometimes take a few minutes. If it
takes longer than that, try updating to the newest version of Conda
with conda update conda or checking out these tips for
improving Conda performance.
Installing PlasmaPy from source code
Obtaining official releases
A ZIP file containing the source code for official releases of PlasmaPy can be obtained from PyPI or from Zenodo.
Alternatively, official releases since 0.7.0 can be downloaded from the releases page on PlasmaPy’s GitHub repository.
Obtaining source code from GitHub
If you have git installed on your computer, you may clone PlasmaPy’s GitHub repository and access the source code from the most recent development version by running:
git clone https://github.com/PlasmaPy/PlasmaPy.git
The repository will be cloned inside a new subdirectory called
PlasmaPy.
If you do not have git installed on your computer, then you may
download the most recent source code from PlasmaPy’s GitHub repository
by going to Code and selecting Download ZIP.
Unzipping the file will
create a subdirectory called PlasmaPy that contains the source
code.
Building and installing
To install the downloaded version of PlasmaPy, enter the
PlasmaPy directory and run:
pip install .
Note
If you noticed any places where the installation instructions could be improved or have become out of date, please create an issue on PlasmaPy’s GitHub repository. It would really help!
Tip
The Contributor Guide has instructions on how to fork a repository and create branches so that you may make contributions via pull requests.