Python interpreter not found
Opened this issue · 0 comments
On a default Windows configuration (with Python 3.10 installed), trying to build //test/...
target results in a following error:
I had to manually do the following steps to fix the build:
- Disable App Installers for python.exe and python3.exe:
- Go over to the installed Python folder and run one of the following commands:
BASH: cp python.exe python3.exe
CMD: copy python.exe python3.exe
Now Bazel correctly finds the Python interpreter and build no longer fails.
There is a way to make all Python related rules use a hermetic Python toolchain as described here.
I haven't yet tested and I don't know if the solution above is viable for us, but it's probably worth considering.
It's also worth mentioning that Bazel has a bug (or it's maybe just how Bazel works): a system-installed interpreter is still used to 'bootstrap' Python targets (bazel-contrib/rules_python#691).
OR we should just document the fix somewhere and not waste our time on this for now (I personally prefer this solution, though I don't like this fix to be sitting in README.md, we should consider making a separate folder for docs).