Open dchang0 opened 8 years ago
hi, I happen to have this problem, too. And I found it may be caused by import_array function that return int instead void in the new version of numpy.
so may be you can use this way to change the import function
#if PY_VERSION >= 3
int init_numpy()
{
import_array();
}
#else
void init_numpy()
{
import_array();
}
#endif
I hope this can help you @dchang0
I was getting this issue when cmake tried to use python3 instead of 2.7 I change line 38 of CMakeLists.txt from:
find_package(PythonLibs REQUIRED)
to
find_package(PythonLibs 2.7 REQUIRED)
After cleaning build it used 2.7 and compiled fine :)
Thanks for the help, both of you. I ended up switching from Debian to Ubuntu 14.04 and Mac OS X Sierra, on which these problems did not occur. Not sure why, but the builds went well. That said, if I get a chance, I'll try your tips and confirm that they work on Debian 8.x here. Thanks again!
@bucketzxm How do you mean that? In which file and line will I have to edit those lines? Any help would be greatly appreciated!
Here's the error (ignore the NumPy 1.7 deprecated warning before it):
I am running Debian 8.5 with OpenCV 3.1.0 (built from GitHub) AND OpenCV 2.4.13 (also built from GitHub) on the same system, with python-numpy 1.8.2-2 (from Debian jessie APT repo). The NumPy warning probably could be handled by downgrading to NumPy 1.7, but I don't have any idea what is causing the error in conversion.cpp.