espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
230 stars 187 forks source link

Document use of virtual environments #4872

Closed jngrad closed 5 months ago

jngrad commented 8 months ago

PEP 0668 changes the behavior of pip to avoid accidentally breaking system-wide packages. This is achieved by disallowing the installation of packages via pip, including pip install --user, when outside of a virtual environment. This new policy has been adopted in Ubuntu 23.04 and will affect all users who migrate from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS next month.

Virtual environments solve a lot of pain points that afflicted ESPResSo users over the years:

Cluster users who module load ESPResSo instead of building it from sources should rely on the following syntax to re-use loaded Python packages instead of installing them again (and potentially breaking the dependency tree):

python3 -m venv --system-site-packages venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate

For more details, see pm-blanco/pyMBE#12

jngrad commented 5 months ago

Addressed by #4922.