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

"'pybind11/pybind11.h' file not found" with PyPy (and does PyPy 5.7 exist?) #596

Closed
gcamp opened this issue Jan 6, 2017 · 4 comments
Closed

Comments

@gcamp
Copy link

gcamp commented Jan 6, 2017

First of all, I'm using PyPy version 5.6. The read me says the requirements is PyPy version 5.7 but as far as know 5.6 is the latest version.

I've done a small package where I can reproduce the problem on a homebrew-installed PyPy.

 pypy -m pip install utf8proc

I can install without problem on Python.

PyPy get_include() :

Python 2.7.12 (aff251e543859ce4508159dd9f1a82a2f553de00, Nov 13 2016, 01:57:41)
[PyPy 5.6.0 with GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import pybind11
>>>> pybind11.get_include()
'/usr/local/Cellar/pypy/5.6.0/libexec'
>>>> pybind11.get_include(True)
'/Users/gcamp/.local/include/python2.7'
>>>>

And indeed /usr/local/Cellar/pypy/5.6.0/libexec doesn't include the pybind11 headers.

Python get_include() :

Python 2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pybind11
>>> pybind11.get_include()
'/usr/local/include/python2.7'
>>> pybind11.get_include(True)
'/Users/gcamp/Library/Python/2.7/include/python2.7'

Here /usr/local/include/python2.7 includes the pybind11 headers.

@dean0x7d
Copy link
Member

dean0x7d commented Jan 8, 2017

PyPy v5.7 is still in development but it's required because previous versions don't support enough of the C API to work with pybind11. On homebrew, you can install the latest nightly with brew install --HEAD pypy (beware, it takes quite some time).

That said, I just tried pip_pypy install pybind11 with PyPy v5.7 and it fails with:

IOError: [Errno 13] Permission denied: '/usr/local/Cellar/pypy/HEAD-f3abf62ba364/libexec/include/eval.h'

Looks like the headers are being installed directly into the include directory instead if include/pybind11 (thus trying to overwrite an existing file which is also called eval.h.). But I'm not sure if it's a bug on the pypy or pybind11 side.

@wjakob
Copy link
Member

wjakob commented Feb 17, 2017

The installation path issue sound like a Pip+PyPy problem (pybind11 does nothing special in this regard, and it's not clear that we could do anything in this project to change the behavior). I suppose this is a "WONTFIX".

@wjakob wjakob closed this as completed Feb 17, 2017
@wojdyr
Copy link
Contributor

wojdyr commented Dec 12, 2017

FTR I just tried PyPy 5.9 with the latest pip, they still have this problem.
pypy2-v5.9.0-linux64/bin/pip install . gets files installed directly in the include/ and include/detail/ directories (eval.py does not get installed).
Then pip uninstall pybind11 removes eval.h from PyPy.

@filips123
Copy link

filips123 commented Mar 12, 2020

@dean0x7d @wjakob I'm still having the same issue with Pip installing includes into root includes directory. Although it doesn't fail with a permission error, it fails when another package (which depends on pybind11) tries to include it. I tested this with pypywheels/manylinux2010-pypy_x86_64 Docker image on PyPy2.7 and PyPy3.6 7.3.0.

Is there anything you could done to fix this? If not, does this mean that pybind11 does not work with PyPy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants