Comments (10)
Hello @garyo, Thank you for creating this issue and we will look into it :)
from setup-python.
I'm having the same problem with v5.1.0 on GitHub hosted ubuntu-22.04
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
Logs:
Run actions/setup-python@v5
with:
python-version: 3.9
cache: pip
check-latest: false
token: ***
update-environment: true
allow-prereleases: false
/usr/bin/docker exec e65a6dddc9afaa41c11c7df09f0617fc3082b82b82346802ca21d63e222dd840 sh -c "cat /etc/*release | grep ^ID"
Installed versions
Successfully set up CPython (3.9.19)
Error: Unable to locate executable file: lsb_release. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
from setup-python.
Hello @garyo, would you mind trying to install lsb-release to see if it addresses the problem you're experiencing? Here are the commands for updating the apt package list and installing lsb-release:
- name : Apt-update
run: sudo apt-get update
- name: Install lsb-release
run: sudo apt-get install -y lsb-release
from setup-python.
It all works fine if that package is installed. It does not work on the image I mentioned (aswf/ci-base:2023) which does not install that by default. Images used for CI builds tend to be quite minimal to save space and speed up startup. Running apt-get update
on every run will slow down CI builds. Perhaps if we know what you need from lsb_release
there may be an alternative way to determine that on more minimal distros.
from setup-python.
This also happens on Alpine 3.17.3, Debian 11.5-slim, and Red Hat Enterprise Linux 8.9 (Ootpa).
from setup-python.
Apparently this is only a problem when using pip
cache:
Lines 169 to 172 in 82c7e63
from setup-python.
Hello @garyo,
In this context, the lsb_release command retrieves the Linux operating system's name and version, facilitating the creation of unique cache keys for Python dependencies. This strategy ensures accurate caching and restoration of dependencies, considering the uniqueness of each combination of the operating system, Python version, and dependency file.
Can you consider using the actions/cache action to cache dependencies and speed up your workflows. In the case of Python, it's often used to cache pip packages. The key for the cache is often generated using the hash of requirements.txt (or other dependency files), and the Python version, not lsb_release. Here is an example:
- name: Cache pip
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: <primaryKey> # Replace with the computed primaryKey
restore-keys: <restoreKey> # Replace with the computed restoreKey
This will cache pip dependencies and reuse them in subsequent runs, reducing the time it takes to install packages.
For any other inquiries or concerns pertaining to rocky-linux, please get in touch with the rocky-linux team.
from setup-python.
Sure, I understand what lsb_release
does. I expect it wouldn't be hard to get the same info in other ways when that is not available, but if you're not interested in that I'll look at other way to setup python on our CI containers.
from setup-python.
#890 seems related. Will try using actions/cache@v4
in the interim.
from setup-python.
Hello @garyo, we are not planning to alter the usage of lsb_release for cache:pip. The provided solution utilizing actions/cache ensures pip dependencies are cached and reused in subsequent runs, thereby minimizing package installation time.
Please feel free to reach us in case of any concerns.
from setup-python.
Related Issues (20)
- Non Portable binary, doesn't work with sudo or without LD_LIBRARY_PATH HOT 3
- Custom setuptools version HOT 12
- Cannot load Python modules if they are in a directory named "test" HOT 6
- Python 3.7/8/9/10 on Darwin runners fails: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib HOT 6
- Setups HOT 1
- My pro HOT 1
- Missing support for Python 3.8 on Ubuntu 24.04 runner HOT 2
- Caching doesn't seem to save that much time HOT 6
- Version not found when using new arm-based linux runners (ubuntu 22.04) HOT 4
- Add Python 3.12.4 (released 2 days ago) HOT 6
- [Feature Request] Add Python debug builds with `Py_DEBUG` flag HOT 1
- Python 3.12.4: Extract downloaded archive; gzip: stdin: not in gzip format HOT 22
- is python 3.12.4 download assets broken HOT 7
- Python 3.13 fails to install on windows: Offset to Central Directory cannot be held in an Int64. HOT 6
- Verify checksum of downloaded version archive HOT 1
- Support os-release standard HOT 3
- setup-python CI workflows have been broken for more than 2 months HOT 1
- Sporadically missing patch versions on python-versions for arm64 HOT 5
- `python-version-file` does not support multiple versions HOT 2
- Cannot parse version number from TOML 1.0.0 pyproject.toml file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-python.