Skip to content

Commit d5d7b22

Browse files
committed
indentation, typos
1 parent 8900263 commit d5d7b22

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/software/uenv/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Views are loaded using the `--view` flag for `uenv start` (also for `uenv run` a
336336

337337
!!! info
338338
Python virtual environments can be created on top of a uenv view.
339-
However, to ensure that the Python interpreter and packages from the uenv view are used, the `PYTHONPATH` and `PYTHONUSERBASE` environment variables must be set correctly, see our guide on [Python virtual environments with uenv][ref-guides-storage-venv].
339+
However, to ensure that the Python interpreter and packages from the uenv view are used, the `PYTHONPATH` and `PYTHONUSERBASE` environment variables must be set correctly, see our guide on [building Python virtual environments with uenv][ref-uenv-venv].
340340

341341
#### Modules
342342

@@ -782,11 +782,11 @@ When stacking a Python virtual environment on top of a _uenv view_, keep Python
782782

783783
- **Unset `PYTHONPATH`**. Anything there is *prepended* to Python's `sys.path`, which can lead to surprising imports.
784784
- **Set `PYTHONUSERBASE` to the view's root directory** (e.g., `/user-environment/env/default`) so the interpreter’s _user site_ resolves inside the view.
785-
- You can derive this automatically from the interpreter you’re about to use: take the parent of `which python`:
786-
```bash
787-
export PYTHONUSERBASE=$(dirname $(dirname $(which python)))
788-
```
789-
- Do not use tools that resolve symlinks (such as `readlink -f` or Python's `Path.resolve()`), as the Python interpreter in the _uenv view_ is a symlink - following it would point outside the view.
785+
- You can derive this automatically from the interpreter you’re about to use: take the parent of `which python`:
786+
```bash
787+
export PYTHONUSERBASE=$(dirname $(dirname $(which python)))
788+
```
789+
- Do not use tools that resolve symlinks (such as `readlink -f` or Python's `Path.resolve()`), as the Python interpreter in the _uenv view_ is a symlink - following it would point outside the view.
790790
- **Create the venv with `--system-site-packages`**.
791791
`venv` disables the user site by default; enabling system site restores both the system site and the user site, so packages provided by the _uenv view_ become visible inside the venv.
792792
@@ -871,12 +871,12 @@ When stacking a Python virtual environment on top of a _uenv view_, keep Python
871871
(my-venv) $ python -m pip list -v --path "$(python -c 'import site; print(site.getusersitepackages())')"
872872
```
873873

874-
!!! note "Troubleshooting & Gotchas"
874+
!!! note "Troubleshooting"
875875
- `pip install --user` will fail here.
876876
The uenv is a read-only squashfs; a `--user` install would try to write into `PYTHONUSERBASE` (the uenv), which is not possible.
877877
- Some uenv views already set `PYTHONUSERBASE`. If you start a uenv view that does this, you can skip setting `PYTHONUSERBASE` yourself.
878-
- The virtual environment is _specific_ to a particular uenv and won't work unless used from inside this excact uenv - it relies on the resources packaged inside the uenv.
878+
- The virtual environment is _specific_ to a particular uenv and won't work unless used from inside this exact uenv - it relies on the resources packaged inside the uenv.
879879
880880
!!! note "Performance considerations"
881-
On our Lustre parallel file system, large venvs can be slow due to many small files.
881+
On our Lustre parallel file system, large virtual environments can be slow due to many small files.
882882
See [How to squash virtual environments][ref-guides-storage-venv] for turning a venv into a compact image to improve startup and import performance.

0 commit comments

Comments
 (0)