Closed nanzhixiong closed 5 years ago
It looks like the numpy headers are missing from your system. Have you installed numpy? which version of opencv and python are you building with?
I had the same error occur when building a docker image, even though numpy was installed. Can you check if numpy is actually installed? If so, can you try hardcoding it's path like I have down here: https://github.com/christian-lanius/PyOpenPose/blob/0881df29ba8794e8f995d8dda4c97cbade15b702/CMakeLists.txt Lines 72 and 85 contain the changes you might want to make to your CMakeLists.txt file. Note that this version of the file is old and will most likely not work, so be careful not to copy the full content.
yes, the numpy is installed.
thank you very much @christian-lanius!
[ 25%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/OpenPoseWrapper.cpp.o [ 50%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/PyOpenPose.cpp.o [ 75%] Building CXX object PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o /home/nan/PyOpenPose-master/PyOpenPoseLib/opencv_expose.cpp:13:33: fatal error: numpy/ndarrayobject.h: No such file or directory compilation terminated. PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/build.make:110: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o' failed make[2]: [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/opencv_expose.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:117: recipe for target 'PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all' failed make[1]: [PyOpenPoseLib/CMakeFiles/PyOpenPose.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2