diff --git a/docs/playbooks/python-workbench.md b/docs/playbooks/python-workbench.md index 148bc5ec..4d216ff8 100644 --- a/docs/playbooks/python-workbench.md +++ b/docs/playbooks/python-workbench.md @@ -7,24 +7,29 @@ Installs a Python development environment equiped with to allow the user to select an arbitrary Python version and *[poetry](https://pypi.org/project/poetry/)* to facilitate Python module dependency management. +*[miniconda](https://docs.anaconda.com/free/miniconda/index.html)* +to facilitate general dependency management. ## Requires -Linux operating system +Ubuntu . ## Description -The Linux distribution influences which Python3 and pip3 versions are installed system-wide. This component therefore installs `pyenv` and `poetry` via the `runonce` role, so that each user on the system can manage their own Python environment. `pyenv` and `poetry` are installed (in userspace) the first time the user logs in. +The Linux distribution influences which Python3 and pip3 versions are installed system-wide. Users should not install python packages using the system python interpreter, since this may break system packages. This component therefore installs `pyenv` and via the `runonce` role, so that each user on the system can manage their own Python environment. `pyenv` and `poetry` are installed (in userspace) the first time the user logs in. + +For additional development convenience, `poetry` and `miniconda` are also intalled on a per-user basis. If users want to use `miniconda`, they have to manually run `conda init` in their shell (this is not done by default, because it may interfere with users' workflows if they do not want to use `conda`). ## Variables -- `default_python_version`: String. The version of Python to be automatically installed for each in user via `pyenv`, at first login. This version is also set as the default version for that user (with `pyenv global`). If this parameter is omitted or set to `system`, `pyenv` will not install a specific version but install use the system's python version by default . Default: `3.9.18`. +- `default_python_version`: String. The version of Python to be automatically installed for each in user via `pyenv`, at first login. This version is also set as the default version for that user (with `pyenv global`). If this parameter is omitted or set to `system`, `pyenv` will not install a specific version but install use the system's python version by default . If this parameter is set to `system-latest`, the latest version of Python available from `apt` will be fetched and set as `pyenv`'s global version for each user. Default: `system-latest`. ## See also - role [runonce](../roles/runonce.md) - role [pyenv](../roles/pyenv.md) - role [runonce](../roles/poetry.md) +- role [miniconda](../roles/miniconda.md) ## History -2021 Written by Ton Smeele (Utrecht University) +2021-2024 Written by Ton Smeele and Dawa Ometto (Utrecht University) [back to index](../index.md#Playbooks) diff --git a/docs/roles/pyenv.md b/docs/roles/pyenv.md index b6ce69c2..8cde4ace 100644 --- a/docs/roles/pyenv.md +++ b/docs/roles/pyenv.md @@ -11,15 +11,21 @@ Pyenv is a Python version management tool, which lets you change the global Pyth ## Description This role will install pyenv for each user individually. For both yum and apt based package managers, all dependencies (primarily needed for compiling python versions) are first downloaded. The installation is then done through the pyenv installer script which is run once when the user logs in. +The role supports installing the latest version of python available in the OS's package manager and registering that python version with `pyenv`. This is useful because OS distributions generally ship with older python versions by default, and when installing an addtional specific python version (e.g. `apt install python3.12` ), `pyenv` will not know about it by default. See the special `system-latest` value for the `default_python_version` variable below. **Note**: this is only supported on Ubuntu at the moment. + ## Variables -- `default_python_version`: String. The version of Python to be automatically installed for each in user at first login. This version is also set as the default version for that user (with `pyenv global`). Default: `system` (don't install a new version, but use the system's python version by default). +- `default_python_version`: String. The version of Python to be automatically installed for each in user at first login. This version is also set as the default version for that user (with `pyenv global`). Default: `system` (don't install a new version, but use the system's python version by default). Possible values: + + * `3.11` (installs latest `3.11` python, e.g. `3.11.1`) + * `3.8.4.1` (install specific version). + * Special value: `system-latest`. Will use the OS's package manager (e.g. `apt`) to fetch the latest packaged python version, and this version will be used as `pyenv`'s global python version instead of the older, default system python version. ## See also - [runeonce role](../roles/runonce.md) ## History -2022 Written by Sytse Groenwold (Utrecht University) +2022-2024 Written by Sytse Groenwold and Dawa Ometto (Utrecht University) [back to index](../index.md#Roles)