-
Notifications
You must be signed in to change notification settings - Fork 551
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
Unable to locate 'pip' when using cache #858
Comments
Hello @jb-2020, Thank you for creating the issue and we will look into it :) |
I think I may have just recreated the issue at https://github.com/hamirmahal/cache-pip-install/actions/runs/8962394394/job/24611209444. |
name: Run
on: [push]
jobs:
python-program:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: "pip"
python-version: "3.x"
- run: python3 src/main.py results in
|
Thanks for checking it out @hamirmahal worth noting that our error messages are different and in our case it is a fatal error:
Looking at your workflow, I think |
Hi @jb-2020, I have attempted to reproduce the issue on my end, but was unable to do so. In our test environment, we have used pip cache without any errors, Here's a screenshot for your reference. Could you assist by sharing a link to a simplified version that reproduces the problem? Thank you!
|
Thanking for checking it out, since we are in an air-gaped environment we are pulling:
Then populating the tools cache with:
Which does install correctly, but pip isn't found. Any thoughts on this approach? |
Hi @jb-2020 , We have followed the approach mentioned in the above comment and successful install the python and used the pip cache without any errors. Here's a screenshot and workflow file for your reference.
Here are a few solutions which might reslove this issue.
|
Hi @jb-2020, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
1 similar comment
Hi @jb-2020, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
Hello @jb-2020 |
@jb-2020 while not exactly your issue, there was a problem I had when using operating systems that preferred the description I was running in to an issue where my local self-hosted runner was failing to resolve the - name: Set up Python
# if: steps.cache_build.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip' And, using solution
On macOS, the workaround: create (temporary) a symlink: ln -s $(which pip3) /usr/local/bin/pip |
Description:
We're on GHES and using self-hosted runners. We're using this action successfully by populating the
RUNNER_TOOL_CACHE
with our version sourced from a github-proxy ofactions/python-versions
.:Unfortunately, after attempting to use the
pip
cache we receive the following error:For what its worth, after running setup-python without the cache flag enabled I added a couple steps to the workflow to view the behavior of pip:
I've verified the appropriate environment variable as well:
RUNNER_TOOL_CACHE=/home/runner/_work/_tool
Action version:
actions/setup-python@v4
- This is the latest available on our version of GHES.Platform:
Runner type:
Tools version:
3.12.0
Repro steps:
This doesn't appear to have been reported in the past, looking for pointers in the right direction to determine if this is an issue in our runner environment.
Expected behavior:
Cache to work as expected
Actual behavior:
See above
The text was updated successfully, but these errors were encountered: