Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upgrade pip on Fedora 38 #1241

Open
akrause2014 opened this issue Nov 23, 2023 · 1 comment
Open

Cannot upgrade pip on Fedora 38 #1241

akrause2014 opened this issue Nov 23, 2023 · 1 comment

Comments

@akrause2014
Copy link
Collaborator

akrause2014 commented Nov 23, 2023

In Fedora, Python packages are packaged in RPMs without RECORD, with rpm in INSTALLER. If a new package is installed via pip and requires a different version from the RPM installed package, pip tries to uninstall the package but this fails.

This is described here: pypa/pip#11631

In Fedora, we currently patch pip to always skip the uninstallation on upgrades when the to-be-unisntalled packages are installed in the /usr prefix. This solves the problem but is utterly Fedora-specific and cannot be upstreamed. The problem is when users use pip to upgrade pip, they lose this patch.

This means that we cannot run pip upgrade because we lose the patch and the packages that are required for the Gaia DMP Zeppelin deployment fail to install.

@Zarquan
Copy link
Collaborator

Zarquan commented Nov 27, 2023

If I'm reading this right, then it is OK to use the fedora package manager to install and update pip

dnf install pip
dnf update pip

using pip to install and update our Python libraries is fine,

- name: Install the required Python packages
become: true
pip:
requirements: "/tmp/requirements.txt"

but we should not use pip to update itself

- name: "Upgrade pip"
become: true
command: "pip install --upgrade pip"

all of which is covered by your pending PR #1240 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants