Skip to content
Snippets Groups Projects
Commit 00cc5e1a authored by Alexander Grund's avatar Alexander Grund
Browse files

Document the requirement to use a virtualenv to install Python packages

All `Python` modules now export `PIP_REQUIRE_VIRTUALENV=true`.
This causes an error when users try to use `pip install` without an
active virtualenv.
This also avoids admins accidentally installing/changing Python packages
in the global module.
parent e064454d
No related branches found
No related tags found
2 merge requests!1131Automated merge from preview to main,!1122Document the requirement to use a virtualenv to install Python packages
......@@ -386,7 +386,10 @@ For additional information refer to the detailed documentation on [modules](../s
!!! hint "Tip for Python packages"
The use of [Virtual Environments](../software/python_virtual_environments.md)
(best in [workspaces](../data_lifecycle/workspaces.md)) is recommended.
(best in [workspaces](../data_lifecycle/workspaces.md)) is required if you want to install
additional Python Packages with `pip`.
When using `pip install` without an activated virtualenv you will get this error:
> ERROR: Could not find an activated virtualenv (required).
Please check the module system, even for specific Python packages,
e.g. `numpy`, `tensorflow` or `pytorch`.
......
......@@ -5,7 +5,14 @@ create an isolated run-time environment. We recommend using `virtualenv` for
this purpose. In your virtual environment, you can use packages from the
[modules list](modules.md) or if you didn't find what you need you can install
required packages with the command: `pip install`. With the command
`pip freeze`, you can see a list of all installed packages and their versions.
`pip list`, you can see a list of all installed packages and their versions.
!!! warning
Note that you cannot install additional Python Packages with `pip`
without an activated virtualenv on our systems.
Doing so will abort with the following error error:
> ERROR: Could not find an activated virtualenv (required).
There are two methods of how to work with virtual environments on ZIH systems:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment