[Python Package] Python dependency errors when using bazel - possible Solution
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
We’re encountering an issue with bazel, specifically with ot_python dependencies, when working on a newly cloned OpenTitan repo. The issue can be also be replicated after a bazel clean --expunge command on the current working repo. see also https://github.com/lowRISC/opentitan/issues/24028
The screenshot of the error is attached for reference.

**Ways to re-create the error:**
1. Create a new clone of OpenTitan.
2. Checkout to one of the production branches.
3. Run any bazel command.
**Temporary Fixes that we have discovered so far:**
1. Run _**bazel info output_base**_ to get the actual HASH of the repo.
2. Copy the attached .py files (wheel and bazel), which are present here as .txt files because of github reasons, to ~/.cache/bazel/_bazel_//external/rules_python/python/pip_in stall/extract_wheels/lib/
[bazel.txt](https://github.com/user-attachments/files/20607589/bazel.txt)
[wheel.txt](https://github.com/user-attachments/files/20607588/wheel.txt)
The respective files are from an older version which do not raise this error. It is to be noted that this is a temporary fix since the .cache folder could be deleted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the dependency error on a fresh OpenTitan clone or after `bazel clean --expunge`, following the listed production-branch steps. Compare the attached `bazel.txt` and `wheel.txt` files with the versions under the Bazel cache, and consider the issue resolved when a normal Bazel command works without manually copying cached files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100