If you would like to contribute to PlasmaPy, please refer to the instructions on installing PlasmaPy for development.
PlasmaPy requires Python version 3.6 or newer, and is not compatible with Python 2.7. PlasmaPy requires the following packages for installation:
PlasmaPy also uses the following optional dependencies:
PlasmaPy can be installed with all of the optional dependencies via
pip install plasmapy[optional].
Creating a conda environment¶
We highly 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), while also simplifying the distribution of binary and compiled dependencies.
After installing conda, create a PlasmaPy environment by running:
conda create -n plasmapy python=3.7 numpy scipy astropy matplotlib h5py lmfit mpmath colorama -c conda-forge
To activate this environment, run:
conda activate plasmapy
Once the environment is activated, then you may proceed with installation.
We recommend that new users create a conda environment.
Installation with pip¶
pip install plasmapy[optional]
To install a minimal set of dependencies (which does not guarantee that
everything will run and may result in
ImportError`s, skip `[all] and run
pip install plasmapy
Installation with conda¶
You can get PlasmaPy from
conda install -c conda-forge plasmapy
Building and installing from source code¶
Obtaining source code¶
The source code for the most recent stable release of PlasmaPy can be downloaded from PyPI.
Development version on GitHub¶
git clone https://github.com/PlasmaPy/PlasmaPy.git
The above command uses HTTPS, which is the default protocol and more straightforward to set up. If you have set up an SSH key, then an equivalent and more secure command is:
git clone email@example.com:PlasmaPy/PlasmaPy.git
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.
The Contributing to PlasmaPy guide has instructions on how to fork a repository so that you may make pull requests.
Building and installing¶
In the top level directory, run
python setup.py install
pip install .