Can't install Python libs

pip install jinja2
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try
zypper install python311-xyz, where xyz is the package
you are trying to install.

If you wish to install a non-rpm packaged Python package,
create a virtual environment using python3.11 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-rpm packaged Python application,
it may be easiest to use `pipx install xyz`, which will manage a
virtual environment for you. Install pipx via `zypper install python311-pipx` .

pipx install jinja2

No apps associated with package jinja2 or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a
similar tool instead.

Why did they do it?? How to install jinja2 normally??

Ok, I found sudo zypper install python311-jinja2 is working.

‘python311-Jinja2’ providing ‘python311-jinja2’ is already installed.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.