How to update pip (since the Gnome 48 update)

Since the update I was able to do on Monday which brought Gnome 48 I immediately noticed that Terminal has a horrible font which I need to fix (anyone else had this?) but I’ve just tried to run pip install flatpak-pip-generator and get an error which I’m confused by… is it normal/expected? I get the same error if I try to upgrade pip too. I’m not in a Python environment, or even use one.

richard@opensusetumbleweed:~/Projects/books> pip3 install flatpak-pip-generator

[notice] A new release of pip is available: 24.3.1 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
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.

Thanks for any help

pip has operated this way for some time now (I want to say years) when not in a virtual python environment (ie, using venv).

The reason for this is if you mix pip-installed modules with system-installed modules, you can create a lot of problems with your python installation.

I would strongly recommend using a venv setup (this is what is recommended) if you need to use modules that are not in the zypper repos.

As for the font issue - I remember reading somewhere that there was a change in fonts with GNOME 48. I don’t really notice that much of a difference, but you can change the font in the terminal settings’ preferences.

1 Like

Adwaita-fonts package. They are nice. Use the tweak tool for system wide changes to the likes of fonts.

1 Like

Yes. What is not clear in this rather long and detail explanation?

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