Still Unspecified error when reinstalling gtk2.0 and opencv3.2
Hi, I am confused about that I can't use some functions in Python. When I call the imshow() in C++, it works without any error. However, when I use python calling imshow, the error occurs as follow:
*Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage*
However,I have already installed libgtk2.0-dev and pkg-config. So I rebuilt opencv as official tutorials again with some information on the console:
As a result , I met the error again. Now I really have no idea about my errors. Could you please give some advice? Thank you very much. And my python version is about 2.7 and Ubuntu is 14.04 I am looking forward to your reply. Thank you very much! Weiyi
========================================================
Sorry about screenshots.
The cv2.getBuildInformation()
as follow:
GUI:
QT: NO
GTK+: NO
GThread : YES (ver 2.12.3)
GtkGlExt: NO
OpenGL support: NO
VTK support: NO
But when I command cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
the information is as follow:
GUI:
QT: NO
GTK+: YES(ver 2.24.23)
GThread : YES (ver 2.12.3)
GtkGlExt: NO
OpenGL support: NO
VTK support: NO
And I also notice that the cv2.getBuildInformation()
gives the information :
Python 2:
Interpreter: python (ver 2.7.13)
Libraries:
numpy: /opt/python/cp27-cp27mu/lib/python2.7/site-packages/numpy/core/include (ver 1.11.1)
packages path: /opt/python/cp27-cp27mu/lib/python2.7/site-packages
but I didn't find any python under opt folder
and command cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
the information is as follow:
Python 2:
Interpreter: python (ver 2.7.6)
Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6)
numpy: /usr/local/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)
packages path: lib/python2.7/site-packages
I have attached some text logs above, thank you again for your repose reply
please give us a TEXT version of your logs & errors, not useless screenshots. thank you !
maybe you're not using your newly built cv2.so, but some older version.
check
cv2.__version__
andcv2.getBuildInformation()
, and see, if that matches your expectations.possible reasons:
make install
Thank you for quick response, I have rewrite my question above with text log.
thanks for the edit !
so, you have 2 python versions, and the new cv2 got installed to the 2.7.6 one in /usr/local
but the old version python2.7.13 doesn't exit in the path /opt/python/cp27-cp27mu/lib/python2.7/site-packages. my opt folder doesn't have any python
And I am sure I am using the python2.7.6
ml@ml:~/python-practice$ python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
...