以下包具有未满足的依赖项OpenCV 3.2 Python 3.5

以下包具有未满足的依赖项OpenCV 3.2 Python 3.5,python,linux,opencv,ubuntu,Python,Linux,Opencv,Ubuntu,我正在尝试一个OpenCV教程,当我运行python代码时,我遇到了这个错误 OpenCV Error: Unspecified error (The function is not implemented. 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 c

我正在尝试一个OpenCV教程,当我运行python代码时,我遇到了这个错误

OpenCV Error: Unspecified error (The function is not implemented. 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 cvShowImage, file /home/pankaja/Desktop/OpenCV-tmp/opencv/modules/highgui/src/window.cpp, line 611
Traceback (most recent call last):
  File "/home/pankaja/PycharmProjects/ImageProcessing/imageprocess.py", line 8, in <module>
    cv2.imshow('image', img)
cv2.error: /home/pankaja/Desktop/OpenCV-tmp/opencv/modules/highgui/src/window.cpp:611: error: (-2) The function is not implemented. 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
如何解决这个问题?我做错了什么

编辑1:在我运行sudo apt get install-f之后,正如@Jeru Luke提到的那样

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libenca0 librubberband2v5 libva-wayland1 linux-headers-4.10.0-27 linux-headers-4.10.0-27-generic linux-headers-4.10.0-30
  linux-headers-4.10.0-30-generic linux-headers-4.4.0-89 linux-headers-4.4.0-89-generic linux-headers-4.4.0-92 linux-headers-4.4.0-92-generic
  linux-image-4.10.0-27-generic linux-image-4.10.0-30-generic linux-image-4.4.0-89-generic linux-image-4.4.0-92-generic
  linux-image-extra-4.10.0-27-generic linux-image-extra-4.10.0-30-generic linux-image-extra-4.4.0-89-generic
  linux-image-extra-4.4.0-92-generic linux-signed-image-4.10.0-27-generic linux-signed-image-4.10.0-30-generic mpv rtmpdump
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgtk-3-dev : Depends: libgtk-3-0 (= 3.18.9-1ubuntu3) but 3.18.9-1ubuntu3.3 is to be installed
                Depends: gir1.2-gtk-3.0 (= 3.18.9-1ubuntu3) but 3.18.9-1ubuntu3.3 is to be installed
                Depends: libatk-bridge2.0-dev but it is not going to be installed
                Depends: libepoxy-dev (>= 1.0) but it is not going to be installed
                Depends: libegl1-mesa-dev but it is not going to be installed
                Depends: libwayland-dev (>= 1.5.91) but it is not going to be installed
                Depends: libmirclient-dev (>= 0.13.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
运行sudo apt get install libopencv-*

编辑2:运行@Zindarod提到的sudo apt get install libgtk-3-dev命令后

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libenca0 librubberband2v5 libva-wayland1 linux-headers-4.10.0-27 linux-headers-4.10.0-27-generic linux-headers-4.10.0-30
  linux-headers-4.10.0-30-generic linux-headers-4.4.0-89 linux-headers-4.4.0-89-generic linux-headers-4.4.0-92 linux-headers-4.4.0-92-generic
  linux-image-4.10.0-27-generic linux-image-4.10.0-30-generic linux-image-4.4.0-89-generic linux-image-4.4.0-92-generic
  linux-image-extra-4.10.0-27-generic linux-image-extra-4.10.0-30-generic linux-image-extra-4.4.0-89-generic
  linux-image-extra-4.4.0-92-generic linux-signed-image-4.10.0-27-generic linux-signed-image-4.10.0-30-generic mpv rtmpdump
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgtk-3-dev : Depends: libgtk-3-0 (= 3.18.9-1ubuntu3) but 3.18.9-1ubuntu3.3 is to be installed
                Depends: gir1.2-gtk-3.0 (= 3.18.9-1ubuntu3) but 3.18.9-1ubuntu3.3 is to be installed
                Depends: libatk-bridge2.0-dev but it is not going to be installed
                Depends: libepoxy-dev (>= 1.0) but it is not going to be installed
                Depends: libegl1-mesa-dev but it is not going to be installed
                Depends: libwayland-dev (>= 1.5.91) but it is not going to be installed
                Depends: libmirclient-dev (>= 0.13.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

仍然没有运气

使用
sudo apt get install-f
修复损坏或丢失的依赖项。感谢帮助,我已经尝试过了,但这是我在阅读软件包列表时得到的。。。已完成构建依赖关系树以读取状态信息。。。完成以下软件包已自动安装,不再需要:。0已升级,0已新安装,0已删除,3未升级。当我运行这个命令sudo-apt-get-install-libopencv-*时,我得到了相同的错误
sudo-apt-get-install-libgtk-3-dev
@Zindarod-dependens:libgtk-3-0(=3.18.9-1ubuntu3),但是要安装的3.18.9-1ubuntu3.3取决于:gir1.2-gtk-3.0(=3.18.9-1ubuntu3)但3.18.9-1ubuntu3.3是否安装取决于:libatk-bridge2.0-dev但不会安装取决于:libepoxy dev(>=1.0)但不会安装取决于:libegl1 mesa dev但不会安装取决于:libwayland dev(>=1.5.91)但它不会被安装。。E:无法更正问题,您持有的软件包已损坏。@ThidasaParanavitharana在问题中添加这些注释作为编辑会有所帮助