-
Notifications
You must be signed in to change notification settings - Fork 619
Failure to install older pip versions (24.2) where 25.1 is the default when actions/cache@v4 hit a cache #1101
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
Comments
Hello @shachafl 👋, |
In my case, I was able to circumvent the error by manually deleting the cache (via the website) and updating my pip version to 25.1 (It was fixed to 24.2) prior to any dependency installation. |
Hi @shachafl 👋,
steps:
...
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install specific pip version
run: python -m pip install --upgrade pip==24.2
- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.OS }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/REQUIREMENTS-CI.txt') }} Let us know if this resolves the issue or if you need any further assistance! |
Thank you @priyagupta108 for the detailed explanation. |
Description:
Workflow failure after getting error (see below) when trying to install a specific pip version. The same workflow worked without issues about 3 weeks ago, and no new changes were made on my end.
In this iteration, it worked once when no cache was used.
Now fails every time when
Run actions/cache@v4
hit a cache.Action version:
'actions/checkout@v4' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
'actions/setup-python@v5' (SHA:a26af69be951a213d495a4c3e4e4022e16d87065)
'actions/cache@v4' (SHA:5a3ec84eff668545956fd18022155c47e93e2684)
Platform:
Runner type:
Tools version:
Repro steps:
https://github.com/spacetx/starfish/actions/runs/14877629662/job/41778019051?pr=2063
Expected behavior:
python -m pip install --upgrade pip==24.2
Collecting pip==24.2
Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 28.2 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 25.0.1
Uninstalling pip-25.0.1:
Successfully uninstalled pip-25.0.1
Successfully installed pip-24.2
Actual behavior:
python -m pip install --upgrade pip==24.2
Notice: A new release of pip is available: 24.2 -> 25.1.1
Notice: To update, run: pip install --upgrade pip
ERROR: Exception:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
return func(self, options, args)
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 363, in run
resolver = self.make_resolver(
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 175, in make_resolver
import pip._internal.resolution.resolvelib.resolver
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 8, in
from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/init.py", line 19, in
from .resolvers import (
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers/init.py", line 1, in
from ..structs import RequirementInformation
ImportError: cannot import name 'RequirementInformation' from 'pip._vendor.resolvelib.structs' (/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py)
The text was updated successfully, but these errors were encountered: