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

numpy headers discoverability issue #2715

Open
AniruddhaChattopadhyay opened this issue Jan 7, 2025 · 0 comments
Open

numpy headers discoverability issue #2715

AniruddhaChattopadhyay opened this issue Jan 7, 2025 · 0 comments

Comments

@AniruddhaChattopadhyay
Copy link

There is a issue with setup.py which leads to in mesh_core_cython.cpp not being able to find the paths of the numpy header files.

I was able to fix it simply by adding numpy.get_include() to the Extension list in setup.py

`

Get the correct path to numpy headers

numpy_include = numpy.get_include()

extensions = [
Extension(
"insightface.thirdparty.face3d.mesh.cython.mesh_core_cython",
["insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.pyx",
"insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp"],
language='c++',
include_dirs=[numpy_include], # Add NumPy include path
),
]
`

I can raise a PR if this issue needs to be resolved.

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

1 participant