If you would like to contribute to PlasmaPy, please check out the Contributor Guide.
PlasmaPy requires a version of Python between 3.9 and 3.11. If you do not have Python installed already, here are the instructions to download Python and install it.
Installing PlasmaPy with pip
To install the most recent release of
plasmapy on PyPI with pip into
an existing Python 3.9+ 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.11 instead of
To install PlasmaPy on Windows, run:
py -3.11 -m pip install plasmapy
The version of Python may be changed from
3.11 to another supported
Python 3.9+ release that has been installed on your computer.
For more detailed information, please refer to this tutorial on installing packages.
Installing PlasmaPy with Conda
Conda is a package management system and environment manager that is commonly used in the scientific Python ecosystem. Conda lets us create and switch between Python environments that are isolated from each other and the system installation. Conda can also be used for packages written in languages other than Python.
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
-c conda-forge indicates that
plasmapy should be installed
from the conda-forge channel.
plasmapy into another existing Conda environment, append
-n env_name to the previous command, where
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
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
plasmapy to the most recent version within a currently
activated Conda environment, run:
conda update plasmapy
Creating a Conda environment can sometimes take a few minutes. If it
takes longer than that, try updating to the newest version of Conda
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
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
Unzipping the file will
create a subdirectory called
PlasmaPy that contains the source
Building and installing
To install the downloaded version of
plasmapy, enter the
PlasmaPy directory and run:
pip install .
If you expect to occasionally edit the source code, instead run:
pip install -e ".[tests,docs]"
-e flag makes the installation editable and
specifies that all of the additional dependencies used while testing the
package should also be installed.
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!
The Contributor Guide has instructions on how to fork a repository and create branches so that you may make contributions via pull requests.