While trying to compile the GridDB Python client, I’m getting the following error:
fatal error C1083: Cannot open include file: ‘numpy/arrayobject.h’: No such file or directory
I’ve installed NumPy using pip, and I’ve verified that the path to NumPy’s include directory is correct in my CMake configuration. Despite this, the error persists. How can I fix this issue to allow the compilation of GridDB with NumPy support in Python?
What I Tried:
- Installed NumPy using pip and confirmed it is accessible in the Python environment by running
import numpy
successfully. - Verified the location of NumPy’s include directory using:
import numpy print(numpy.get_include())
- Configured CMake with the
-DNUMPY_INCLUDE_DIR
flag to explicitly set the path to NumPy’s headers:cmake -DNUMPY_INCLUDE_DIR=C:/Path/To/Python/Lib/site-packages/numpy/core/include ..
- Checked permissions on the NumPy directory to ensure it is accessible.
- Reinstalled NumPy and Python to rule out environment issues.
What I Expected:
I expected CMake to locate the NumPy headers and proceed with the GridDB Python client compilation without errors.
What Actually Happened:
The compilation fails with the following error:
fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory
F21 9272 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.