|
| 1 | +.. _plasmapy-install: |
| 2 | + |
| 3 | +.. |minpython| replace:: 3.8 |
| 4 | + |
| 5 | +.. _git: https://git-scm.com/ |
| 6 | +.. |git| replace:: git_ |
| 7 | + |
| 8 | +.. _pip: https://pip.pypa.io |
| 9 | +.. |pip| replace:: pip_ |
| 10 | + |
| 11 | +.. _Python: https://www.python.org/ |
| 12 | +.. |Python| replace:: Python_ |
| 13 | + |
| 14 | +.. _PyPI: https://pypi.org/ |
| 15 | +.. |PyPI| replace:: PyPI_ |
| 16 | + |
| 17 | +.. _`Github repository`: https://github.com/PlasmaPy/plasmapy_sphinx |
| 18 | +.. |Github repository| replace:: `Github repository`_ |
| 19 | + |
| 20 | +.. role:: py(code) |
| 21 | + :language: python |
| 22 | + |
| 23 | +.. role:: bash(code) |
| 24 | + :language: bash |
| 25 | + |
| 26 | +**************************** |
1 | 27 | Installing `plasmapy_sphinx` |
2 | | -============================ |
| 28 | +**************************** |
| 29 | + |
| 30 | +`plasmapy_sphinx` requires a minimum |Python| version of |minpython|. If |
| 31 | +you do not have |Python| installed already, here are the instructions |
| 32 | +to `download Python`_ and install it. 🐍 |
| 33 | + |
| 34 | +.. contents:: Contents |
| 35 | + :local: |
| 36 | + |
| 37 | +.. _install-pip: |
| 38 | + |
| 39 | +Installing with pip |
| 40 | +=================== |
| 41 | + |
| 42 | +To install the most recent release of `plasmapy_sphinx` on |PyPI| with |
| 43 | +|pip| into an existing |Python| |minpython|\ + environment on macOS or |
| 44 | +Linux, open a terminal and run: |
| 45 | + |
| 46 | +.. code-block:: bash |
| 47 | +
|
| 48 | + python -m pip install plasmapy |
| 49 | +
|
| 50 | +On some systems, it might be necessary to specify the |Python| version |
| 51 | +number by using ``python3``, ``python3.8``, ``python3.9``, |
| 52 | +``python3.10``, or ``python3.11`` instead of ``python``. |
| 53 | + |
| 54 | +To install PlasmaPy on Windows, run: |
| 55 | + |
| 56 | +.. code-block:: bash |
| 57 | +
|
| 58 | + py -3.11 -m pip install plasmapy |
| 59 | +
|
| 60 | +The version of |Python| may be changed from ``3.11`` to another supported |
| 61 | +Python |minpython|\ + release that has been installed on your computer. |
| 62 | + |
| 63 | +For more detailed information, please refer to this tutorial on |
| 64 | +`installing packages`_. |
| 65 | + |
| 66 | +Installing from source code |
| 67 | +=========================== |
| 68 | + |
| 69 | +Obtaining official releases |
| 70 | +--------------------------- |
| 71 | + |
| 72 | +A ZIP_ file containing the source code for official releases of |
| 73 | +`plasmapy_sphinx` can be obtained `from PyPI`_. |
| 74 | + |
| 75 | +Alternatively, official releases can be downloaded from the releases_ |
| 76 | +page on the |GitHub repository|. |
| 77 | + |
| 78 | +Obtaining source code from GitHub |
| 79 | +--------------------------------- |
| 80 | + |
| 81 | +If you have |git| installed on your computer, you may clone the |
| 82 | +|Github repository| and access the source code from the most |
| 83 | +recent development version by running: |
| 84 | + |
| 85 | +.. code-block:: bash |
| 86 | +
|
| 87 | + git clone https://github.com/PlasmaPy/plasmapy_sphinx.git |
| 88 | +
|
| 89 | +The repository will be cloned inside a new subdirectory called |
| 90 | +:file:`plasmapy_sphinx`. |
| 91 | + |
| 92 | +If you do not have |git| installed on your computer, then you may |
| 93 | +download the most recent source code from |Github repository| |
| 94 | +by going to :guilabel:`Code` and selecting :guilabel:`Download ZIP`. |
| 95 | +`Unzipping <https://www.wikihow.com/Unzip-a-File>`__ the file will |
| 96 | +create a subdirectory called :file:`plasmapy_sphinx` that contains the |
| 97 | +source code. |
| 98 | + |
| 99 | +Building and installing |
| 100 | +----------------------- |
| 101 | + |
| 102 | +To install the downloaded version of `plasmapy_sphinx`, enter the |
| 103 | +:file:`plasmapy_sphinx` directory and run: |
| 104 | + |
| 105 | +.. code-block:: bash |
| 106 | +
|
| 107 | + pip install . |
| 108 | +
|
| 109 | +If you expect to occasionally edit the source code, instead run: |
| 110 | + |
| 111 | +.. code-block:: bash |
| 112 | +
|
| 113 | + pip install -e . |
| 114 | +
|
| 115 | +The ``-e`` flag makes the installation editable. |
| 116 | + |
| 117 | +.. note:: |
| 118 | + |
| 119 | + If you noticed any places where the installation instructions could |
| 120 | + be improved or have become out of date, please `create an issue`_ on |
| 121 | + |Github repository|. It would really help! |
3 | 122 |
|
4 | | -blah |
| 123 | +.. _clone a repository using SSH: https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-ssh-urls |
| 124 | +.. _create an issue: https://github.com/PlasmaPy/plasmapy_sphinx/issues/new |
| 125 | +.. _download Python: https://www.python.org/downloads |
| 126 | +.. _from PyPI: https://pypi.org/project/plasmapy_sphinx |
| 127 | +.. _installing packages: https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-vcs |
| 128 | +.. _releases: https://github.com/PlasmaPy/plasmapy_sphinx/releases |
| 129 | +.. _virtual environment: https://realpython.com/python-virtual-environments-a-primer |
| 130 | +.. _ZIP: https://en.wikipedia.org/wiki/ZIP_(file_format) |
0 commit comments