Skip to content
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

Python interpreter not found #471

Open
NikitaNikolaenko opened this issue Jul 19, 2022 · 0 comments
Open

Python interpreter not found #471

NikitaNikolaenko opened this issue Jul 19, 2022 · 0 comments
Labels

Comments

@NikitaNikolaenko
Copy link
Contributor

On a default Windows configuration (with Python 3.10 installed), trying to build //test/... target results in a following error:
image

I had to manually do the following steps to fix the build:

  1. Disable App Installers for python.exe and python3.exe:

image

  1. 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 (bazelbuild/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).

@NikitaNikolaenko NikitaNikolaenko changed the title Python interpreter not found (Windows) Python interpreter not found Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant