Skip to content

Commit 792f6b8

Browse files
kodiakhq[bot]jngrad
authored andcommitted
Document Python environments (#4922)
Description of changes: - encourage the use of Python environments (venv, conda, etc.) in the installation instructions
1 parent 89737a8 commit 792f6b8

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

doc/sphinx/installation.rst

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,30 @@ are required to be able to compile and use |es|:
7373
Python
7474
|es|'s main user interface relies on Python 3.
7575

76+
We strongly recommend using Python environments to isolate
77+
packages required by |es| from packages installed system-wide.
78+
This can be achieved using venv [7]_, conda [8]_, or any similar tool.
79+
Inside an environment, commands of the form
80+
``sudo apt install python3-numpy python3-scipy``
81+
can be rewritten as ``python3 -m pip install numpy scipy``,
82+
and thus do not require root privileges.
83+
84+
Depending on your needs, you may choose to install all |es|
85+
dependencies inside the environment, or only the subset of
86+
dependencies not already satisfied by your workstation or cluster.
87+
For the exact syntax to create and configure an environment,
88+
please refer to the tool documentation.
89+
7690
Cython
7791
Cython is used for connecting the C++ core to Python.
7892

93+
Python environment tools may allow you to install a Python executable
94+
that is more recent than the system-wide Python executable.
95+
Be aware this might lead to compatibility issues if Cython
96+
accidentally picks up the system-wide :file:`Python.h` header file.
97+
In that scenario, you will have to manually adapt the C++ compiler
98+
include paths to find the correct :file:`Python.h` header file.
99+
79100

80101
.. _Installing requirements on Ubuntu Linux:
81102

@@ -86,9 +107,9 @@ To compile |es| on Ubuntu 22.04 LTS, install the following dependencies:
86107

87108
.. code-block:: bash
88109
89-
sudo apt install build-essential cmake cython3 python3-pip python3-numpy \
90-
libboost-all-dev openmpi-common fftw3-dev libfftw3-mpi-dev libhdf5-dev libhdf5-openmpi-dev \
91-
python3-scipy python3-opengl libgsl-dev freeglut3
110+
sudo apt install build-essential cmake cython3 python3-dev openmpi-bin \
111+
libboost-all-dev fftw3-dev libfftw3-mpi-dev libhdf5-dev libhdf5-openmpi-dev \
112+
python3-pip python3-numpy python3-scipy python3-opengl libgsl-dev freeglut3
92113
93114
Optionally the ccmake utility can be installed for easier configuration:
94115

@@ -971,3 +992,12 @@ ____
971992
972993
.. [5]
973994
https://www.fftw.org/
995+
996+
.. [6]
997+
https://docs.nvidia.com/cuda/
998+
999+
.. [7]
1000+
https://docs.python.org/3/library/venv.html
1001+
1002+
.. [8]
1003+
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

0 commit comments

Comments
 (0)