You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
first thank you for providing this project. I have some problems in conjunction with pybind11. I am getting the following error when trying to build with a hermetic python:
In file included from external/pybind11/include/pybind11/detail/common.h:215:0,
from external/pybind11/include/pybind11/pytypes.h:12,
from external/pybind11/include/pybind11/cast.h:13,
from external/pybind11/include/pybind11/attr.h:13,
from external/pybind11/include/pybind11/pybind11.h:13,
from my_pb_mod.cc:1:
bazel-out/k8-fastbuild/bin/external/local_config_python/python_include/Python.h:8:10: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^~~~~~~~~~~~
compilation terminated.
Do you know what can be the reason for this? Maybe this header is not exposed?
The text was updated successfully, but these errors were encountered:
It would be helpful to know how you are building pybind. But if you're using the pybind11_bazel project, you should set the python_interpreter_target attr [1].
If you're building by hand, make sure you let the c compiler know where to find the headers. The headers should be under ${BUILD_DIR}/bazel_install/python3.8/include. In my example, I also expose it through a filegroup target [2].
I have set the python_interpreter_target to @python_interpreter//:python_bin. I have a minimal example here if you want to try it out. I am actually a little bit lost because I don't have the knowledge.
Hello,
first thank you for providing this project. I have some problems in conjunction with pybind11. I am getting the following error when trying to build with a hermetic python:
In file included from external/pybind11/include/pybind11/detail/common.h:215:0,
from external/pybind11/include/pybind11/pytypes.h:12,
from external/pybind11/include/pybind11/cast.h:13,
from external/pybind11/include/pybind11/attr.h:13,
from external/pybind11/include/pybind11/pybind11.h:13,
from my_pb_mod.cc:1:
bazel-out/k8-fastbuild/bin/external/local_config_python/python_include/Python.h:8:10: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^~~~~~~~~~~~
compilation terminated.
Do you know what can be the reason for this? Maybe this header is not exposed?
The text was updated successfully, but these errors were encountered: