-
Notifications
You must be signed in to change notification settings - Fork 52
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
How to embed Python interpreter? #80
Comments
For something like "hello, world" tinkering, it might be easiest to use the |
I tried this out and I'm getting a runtime exception on Windows 10. Step by step debugging in Visual Studio takes me down into pylifecycle.c from the Python source code, which was originally at |
Oh, whoa! Now I'm wondering whether such crashing might be related to "trying to take settings from the local environment" somehow? Apart from that, the hermetic Python toolchains are |
I've investigated this issue much more and I posted my findings under the issue you linked. The resolution must wait on some new code on the python_rules side. It is also blocked on a bug fix for bazelbuild/rules_python#1823 which is currently in progress. |
Many thanks for digging into this! :D |
Sorry I'm not so good at Bazel. The current doc says "embed Python, add @rules_python//python/cc:current_py_cc_libs as a dependency to your cc_binary."
But this doesn't seem enough because the header "pybind11/embed.h" would not be found. What additional dependencies should I add to build the following minimal example?
The text was updated successfully, but these errors were encountered: