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

pip upgrade can fail in ansible install #6074

Open
TheRealFalcon opened this issue Mar 5, 2025 · 2 comments
Open

pip upgrade can fail in ansible install #6074

TheRealFalcon opened this issue Mar 5, 2025 · 2 comments
Labels
bug Something isn't working correctly

Comments

@TheRealFalcon
Copy link
Member

TheRealFalcon commented Mar 5, 2025

The pip install --upgrade pip in the ansible module, can result in the following:

/usr/bin/python3 -m pip install --break-system-packages --upgrade pip
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (25.0)
Collecting pip
  Using cached pip-25.0.1-py3-none-any.whl.metadata (3.7 kB)
Using cached pip-25.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 25.0
error: uninstall-no-record-file

× Cannot uninstall pip 25.0
╰─> The package's contents are unknown: no RECORD file was found for pip.

hint: The package was installed by debian. You should check if it can uninstall the package.

This will cause the module to exit with exception.

@TheRealFalcon TheRealFalcon added bug Something isn't working correctly new An issue that still needs triage and removed new An issue that still needs triage labels Mar 5, 2025
@AliyevH
Copy link
Contributor

AliyevH commented Mar 5, 2025

@TheRealFalcon What do you think to do? Catch exception?

@TheRealFalcon
Copy link
Member Author

@AliyevH , yes I'm thinking that in most cases we shouldn't need pip updated, so we can catch and log the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants