Installing PlasmaPy


If you would like to contribute to PlasmaPy, please refer to the instructions on installing PlasmaPy for development.


PlasmaPy requires Python version 3.7 or newer. PlasmaPy requires the following packages for installation:

PlasmaPy also depends on the following packages for optional features:

Installing PlasmaPy

Installation with pip

To install the most recent release of PlasmaPy on PyPI with pip into an existing Python environment with both required and optional dependencies, run

pip install plasmapy[all]

PlasmaPy may be installed with the required but not the optional dependencies with the following command, though this may result in an ImportError when using certain specialized functionality.

pip install plasmapy


In some systems, it may be necessary to use pip3 instead of pip.

Installation with conda

We recommend installing PlasmaPy from a Python environment created using Conda. Conda allows us to create and switch between Python environments that are isolated from each other and the system installation (in contrast to this xkcd).

After installing conda, create a PlasmaPy environment with all required and optional dependencies by running:

conda create -n env_name python=3.9 plasmapy -c conda-forge

where env_name is replaced by the name of the environment. To activate this environment, run:

conda activate env_name

Building and installing from source code

Obtaining source code

Stable release

The source code for the most recent stable release of PlasmaPy can be downloaded from PyPI or from Zenodo.

Development version on GitHub

If you have git installed on your computer, you may clone PlasmaPy’s GitHub repository and access source code from the most recent development version by running:

git clone

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 selecting “Clone or Download”, which will give you the option to download a zip file.


Cloning a repository with HTTPS as above is recommended, but you may also clone a repository using SSH as a more secure alternative.


The How to Contribute guide has instructions on how to fork a repository and create branches so that you may make pull requests.

Building and installing

In the PlasmaPy directory, run

pip install -e .[all]

where -e makes the installation editable and [all] will ensure that all optional dependencies are installed. PlasmaPy could also be installed by running

python install

Note, however, that this does not download all the dependencies. Check the requirements/requirements.txt file for the current set.