Skip to content

Commit 570eb85

Browse files
committed
docs: update installation instructions for uv and conda [skip bump]
1 parent 49cc886 commit 570eb85

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

docs/installation.rst

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,48 @@
33
Installation
44
############
55

6-
The recommended way to install Python and desired packages (like OpenPNM) is using `uv <https://docs.astral.sh/uv>`_. `uv` has rapidly become the most popular package manager for Python. You'll be able to find lots of blog articles extolling the virtues of `uv`, but its main feature is speed.
6+
``uv``
7+
------
78

8-
1. First you need to install `uv`. The official installation instructions are provided on the `astral website <https://docs.astral.sh/uv/getting-started/installation>`_. This will install `uv` on your system so it will be available from the terminal or command line.
9-
2. Next you navigate to the folder where the project files and data will be or already are stored, like scripts and tomograms.
10-
3. Then you create a virtual environment in that directory using `uv venv --python 3.12`. This adds a `.venv` folder, where `uv` will store all its information. Note that OpenPNM only supports python version 3.11, 3.12 and 3.13. This is largely because of dependencies which have firm version requirements.
11-
4. Finally, you run `uv pip install openpnm`. The first time you do this `uv` will download and compile a few things, which may take some time, but it will store all of this so subsequent usage will be much faster.
9+
The recommended way to install Python and desired packages (like OpenPNM) is using `uv <https://docs.astral.sh/uv>`_. ``uv`` has rapidly become the most popular package manager for Python. You'll be able to find lots of blog articles extolling the virtues of ``uv``, but its main feature is speed.
1210

13-
When using `uv` we recommend `VSCode <https://code.visualstudio.com/>`_ as the IDE to write and edit scripts. VSCode will automatically find the `venv` inside the current folder, which is very handy. Spyder is a good IDE for scientific programming, but it does not (yet) have automatic support for finding `venvs` so is cumbersome to use when switching between projects.
11+
1. First you need to install ``uv``. The official installation instructions are provided on the `astral website <https://docs.astral.sh/uv/getting-started/installation>`_. This will install ``uv`` on your system so it will be available from the terminal or command line.
12+
2. Next you navigate to the folder where the project files and data will be or already are stored, like scripts and tomograms.
13+
3. Then you create a virtual environment in that directory using ``uv venv --python 3.12``. This adds a ``.venv`` folder, where ``uv`` will store all its information. Note that OpenPNM only supports python version 3.11, 3.12 and 3.13. This is largely because of dependencies which have firm version requirements.
14+
4. Finally, you run `uv pip install openpnm`. The first time you do this ``uv`` will download and compile a few things, which may take some time, but it will store all of this so subsequent usage will be much faster.
1415

15-
Installing the `dev` version
16-
############################
16+
When using ``uv`` we recommend `VSCode <https://code.visualstudio.com/>`_ as the IDE to write and edit scripts. VSCode will automatically find the ``venv`` inside the current folder, which is very handy. Spyder is a good IDE for scientific programming, but it does not (yet) have automatic support for finding ``venvs`` so is cumbersome to use when switching between projects.
17+
18+
``conda``
19+
---------
20+
21+
OpenPNM is also available via the `conda <https://docs.conda.io/en/latest/>`_ package manager. If you prefer to use ``conda``, you can install OpenPNM by running the following command in your terminal or command prompt:
22+
23+
.. code-block:: bash
24+
25+
$ conda install conda-forge::openpnm
26+
27+
Installing the ``dev`` version
28+
##############################
1729

1830
If you are a OpenPNM contributor or want to get the newest updates as they roll in, you need to clone the OpenPNM repository from Github and install it locally. It's not as difficult as it sounds, just follow these steps:
1931

2032
Open up the terminal/cmd and use ``cd`` to navigate to the directory where you want to store the OpenPNM code. Clone the repo to your disk using:
2133

34+
.. code-block:: bash
35+
2236
$ git clone https://github.com/PMEAL/OpenPNM
2337
2438
Since your terminal is currently in the OpenPNM directory, you can now install OpenPNM and all its dependencies with:
2539

40+
.. code-block:: bash
41+
2642
$ uv pip install -e .
2743
2844
Voila! You can now use the latest features available on the ``dev`` branch. To keep your "local" OpenPNM installation up to date, you should regularly pull the latest changes:
2945

46+
.. code-block:: bash
47+
3048
$ git pull
3149
3250
.. warning::

0 commit comments

Comments
 (0)