[Linux] Fix bootstrap failure after python update #41836
Draft
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The bootstrap script is trying to use Python 3.11 specifically, when your Linux system has been updated to Python 3.13. The error message mentions python3.11-venv but you have python3-venv for Python 3.13 installed.
The issue is on line 153-154 of bootstrap.sh. It's hardcoding python311.json for Darwin and Windows, but NOT for Linux. The script assumes Linux will use the system Python, which now is Python 3.13, but the Pigweed setup is trying to create a venv with Python 3.11 specific packages.
This PR use Python from CIPD for Linux, just like it does for Darwin and Windows. This will ensure that Python 3.11 is downloaded and used consistently across all platforms, avoiding conflicts with your system's Python 3.13.
Re-run the bootstrap script:
This should now download Python 3.11 from CIPD for Linux and create the virtual environment successfully, avoiding the conflict with your system's Python 3.13.
The change I made adds -e linux:$_PYTHON_CIPD_JSON to the gen_pigweed_cipd_json.py command, which tells it to include the Python 3.11 CIPD package for Linux as well.
Related issues
N/A
Testing
rm -rf .environment
Re-run the bootstrap script:
source scripts/bootstrap.sh --platform linux
Readability checklist