I just tried to update the pip package, but it didn’t work. The error message is as follows:
poplar@c004-h0:~> pip install --upgrade mkdocs
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` .
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
poplar@c004-h0:~>
poplar@c004-h0:~> pip --version
pip 23.1.2 from /usr/lib/python3.11/site-packages/pip (python 3.11)
poplar@c004-h0:~> python3 --version
Python 3.11.4
Operating System: openSUSE Tumbleweed 20230822
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
I’m not quite sure where the problem is. Currently I use python3 -m venv .venv
to work around the inability to upgrade packages.