Problem instaling libgtk2.0-dev and pkg-config

asked 2019-09-11 01:23:27 -0600

Volt-AmperAI gravatar image

Hi friends, developers, I do not know much English, but I'm trying to learn opencv without Russian instructions for installing opencv. There was a problem at the step of launching the facedetect.py test window from the /opencv-4.1.1/samples/facedetect.py folder.

Here is this piece of program error:

cv2.error: 0pencV(4.1.1 ) /home/pi/opencv/opencv-4.1.1/modules/highgui/src/window.cpp:627: e rror: (-2:Unspecified error) The function is not implemented. Rebuild the library with Wind ows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and p kg-config, then re-run cmake or configure script in function 'cvShowImage

edit retag flag offensive close merge delete

Comments

there is no gui (in opencv) on your computer. What is your platform? Did you build opencv?

LBerger gravatar imageLBerger ( 2019-09-11 02:39:09 -0600 )edit

For raspberry pi 3/4. In root:

sudo apt install libgtk2.0-dev and pkg-config

or pip:

sudo pip3 install libgtk2.0-dev and pkg-config
supra56 gravatar imagesupra56 ( 2019-09-11 22:11:10 -0600 )edit

pi@raspberrypi: $ apt show pkgconf Рackage: pkgconf Version: 1.6.0-1 Priority: optional Section: devel Maintainer: Andrej Shadura <[email protected] installed-size:="" 233="" kВ="" provides:="" pkg-config="" (0.29-1)="" depends:="" libcб="" (>3d="" 2.4),="" libdpkg-perl="" breaks:="" pkg-config="" (>="" 0.29-1)="" homepage:="" https:="" github.com="" pkgconf="" pkgconf="" |down="" load-size:="" 56,5="" kв="" АРТ="" -sources:="" http:="" raspbian.raspberrypi.org="" raspbian="" busterfmain="" armhf="" packages="" description:="" manage="" compile="" and="" link="" flags="" for="" libraries="" pkgconf="" is="" a="" replacement="" for="" pkg-config,="" a="" system="" for="" managing="" library="" compile="" and="" link="" flags="" that="" works="" with="" automake="" and="" autoconf="" ..<="" p="">

pkgconf does not bundle any third-party libraries or depend third-party libraries. on any third-party libraries.

Pkg-config was installed before compiling the opencv package

Volt-AmperAI gravatar imageVolt-AmperAI ( 2019-09-11 23:49:53 -0600 )edit

LBerger, Python 3.7.3 (default April 3 2019) [GCC 8.2.0] on Linux Type "help", "copyright", "credits" or "license" for more information

import cv2 cv2.__version__ '4.1.1'

Volt-AmperAI gravatar imageVolt-AmperAI ( 2019-09-11 23:54:31 -0600 )edit

sudo apt-get install cmake cmake-curses-gui libgtk2.0-dev

With this command I install libgtk2.0-dev, then I don’t understand where to look for a problem place further.

Volt-AmperAI gravatar imageVolt-AmperAI ( 2019-09-12 00:01:32 -0600 )edit

What is your cmake output?

LBerger gravatar imageLBerger ( 2019-09-12 00:59:58 -0600 )edit

sudo apt install libgtk-3-dev

  • D WITH_GTK=ON \
  • D WITH_OPENGL=ON I will try to rebuild cmake and gave advice on another resource, install a more recent version libgtk
Volt-AmperAI gravatar imageVolt-AmperAI ( 2019-09-12 02:22:20 -0600 )edit

That's not cmake output. run cmake and insert in your question using edit button what cmake writes on screen

LBerger gravatar imageLBerger ( 2019-09-12 02:24:07 -0600 )edit

LBerger, tell me what kind of output cmake?

Volt-AmperAI gravatar imageVolt-AmperAI ( 2019-09-12 02:24:32 -0600 )edit

That is my cmake output AT line 123 my GUI configuration use WIN32UI. What's your cmake output for GUI?

LBerger gravatar imageLBerger ( 2019-09-12 03:31:23 -0600 )edit