-
Notifications
You must be signed in to change notification settings - Fork 70
fatal error: pybind11/pybind11.h: No such file or directory #2
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
Comments
This is a problem with the installation. The pybind11 dependency isn't being found. It's hard to easily say what the problem is. Some quick questions:
Would you be willing to run these lines and then list the files in the folders that are output for me? >>> import pybind11
>>> pybind11.get_include()
'/usr/local/include/python2.7'
>>> pybind11.get_include(True)
'/home/tbent/.local/include/python2.7' |
>>> import pybind11
>>> pybind11.get_include()
'/home/chadgh/.pyenv/versions/3.5.1/include/python3.5m'
>>> pybind11.get_include(True)
'/home/chadgh/.local/include/python3.5m' So maybe 3.5.1 is not supported? |
I use 3.5 for development, so that's not it. Could you list the files in these folders? |
Those paths don't exist. I have I also did a search (using the |
In the virtualenvironment there is |
Want to list the files in |
Sure
|
Okay. So, it seems that pybind11 package installed the headers in Wenzel Jakob, who is the maintainer of that project, is usually pretty responsive. Would you be up for opening an issue there? In the meantime, you can hack things to work properly by opening return os.path.dirname(
locations.distutils_scheme('pybind11', *args, **kwargs)['headers']) to just have the hardcoded path where the |
Hmm, @tbenthompson your suggestion didn't seem to work I replace the line you specified with:
And am getting the same error. I've confirmed that that is the location of the directory with all of the Also, according to @wjakob this looks like it might be a pip issue. pypa/pip#3696 |
I did just confirm that if I avoid the virtualenv, the example works. |
Glad we got to the root of the problem. Thanks for reporting this. With your hack fix, the
|
I have the same problem with python 3.7. |
Did you read through the posts above? This would be a problem with the installation of pybind11, its interaction with pip and the function |
Hi @timbicker , I mange to resolve this issue inside a virtualenv of python2.7 by installing pybind11 using conda install pybind11 Hope this helps |
Thanks for your help, I could solve the problem by doing the apt installs from the installation instruction. |
Installing pybind11 with conda first fixed it for me, as per @jvines' suggestion |
I got the same error when I tried to install |
That |
Same issue here:
How to fix it ? |
Thanks, it helped ! |
I had same problem. It seems that pip does not include pybind11 properly. Hence, I reinstalled pybind11 manully after cloning the package from github repository. |
It seems like the PyPI (pip) pybind11 package works for some people and not others. Have you tried the conda pybind11 package? That seems to consistently work, but obviously is useless if you're not using conda. |
I can confirm this works with python3.8 as well. |
just confirmed the pip installation of pybind does not install the .h files for me as well, weird. Using windows with python 3.7.4. However, using pip install pybind11[global] fixed the issue for me. |
Glad you got the issue resolved! You might leave post an issue to the pybind11 github issue tracker. |
It didn't work for me tho... I don't know why, but in my conda env it is just impossible for me to get pybind11 to work... Full error prompt bellow:
|
Hi @borgarpa I don't have a solution for you, but I just wanted to mention something that looks a bit funny to me. In the
That folder should show up in the For me, I get:
|
this worked for me. Thanks Mr. benthompson |
I tried following the example in the README and got the following error:
The text was updated successfully, but these errors were encountered: