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:
NumPy — 1.18.1 or newer
SciPy — 1.2 or newer
Astropy — 4.0 or newer
pandas — 1.0 or newer
xarray — above 0.14
tqdm — 4.41 or newer
cached_property — 1.5.2 or newer
PlasmaPy also depends on the following packages for optional features:
Installation with pip¶
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
using certain specialized functionality.
pip install plasmapy
In some systems, it may be necessary to use
pip3 instead of
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
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¶
Development version on GitHub¶
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 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¶
PlasmaPy directory, run
pip install -e .[all]
-e makes the installation editable and
[all] will ensure that
all optional dependencies are installed. PlasmaPy could also be installed
python setup.py install
Note, however, that this does not download all the dependencies. Check the
requirements/requirements.txt file for the current set.