You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/software/uenv/index.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,7 +336,7 @@ Views are loaded using the `--view` flag for `uenv start` (also for `uenv run` a
336
336
337
337
!!! info
338
338
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].
340
340
341
341
#### Modules
342
342
@@ -782,11 +782,11 @@ When stacking a Python virtual environment on top of a _uenv view_, keep Python
782
782
783
783
-**Unset `PYTHONPATH`**. Anything there is *prepended* to Python's `sys.path`, which can lead to surprising imports.
784
784
-**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`:
- 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`:
- 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.
790
790
- **Create the venv with `--system-site-packages`**.
791
791
`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.
792
792
@@ -871,12 +871,12 @@ When stacking a Python virtual environment on top of a _uenv view_, keep Python
The uenv is a read-only squashfs; a `--user` install would try to write into `PYTHONUSERBASE` (the uenv), which is not possible.
877
877
- 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.
879
879
880
880
!!! 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.
882
882
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