title: The following packages have unmet dependencies OpenCV 3.2 Python 3.5
body: <p>I was trying an OpenCV tutorial and when I run the python code I got this error </p>
  
  <pre><code>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 &lt;module&gt;
      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
  </code></pre>
  
  <p>So as for <a href="https://stackoverflow.com/questions/14655969/opencv-error-the-function-is-not-implemented">OpenCV error: the function is not implemented</a> this stackoverflow answer I tried the command <strong>sudo apt-get install libopencv-*</strong> and got this,</p>
  
  <pre><code>*The following packages have unmet dependencies:
   libopencv-apps-dev : Depends: libcv-bridge-dev but it is not going to be installed
                        Depends: libdynamic-reconfigure-config-init-mutex-dev but it is not going to be installed
                        Depends: libimage-transport-dev but it is not going to be installed
                        Depends: libnodeletlib-dev but it is not going to be installed
                        Depends: libroscpp-dev but it is not going to be installed
   libopencv-highgui-dev : Depends: libgtk2.0-dev but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.*
  </code></pre>
  
  <p>How to solve this? What have I done wrong ?</p>
  
  <p>Edit 1 : after I run <strong>sudo apt-get install -f</strong> as @Jeru Luke mentioned</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>still getting the error when I run <strong>sudo apt-get install libopencv-*</strong></p>
  
  <p>Edit 2 : After run the <strong>sudo apt-get install libgtk-3-dev</strong> command as @Zindarod mentioned</p>
  
  <pre><code>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 (&gt;= 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 (&gt;= 1.5.91) but it is not going to be installed
                  Depends: libmirclient-dev (&gt;= 0.13.3) but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
  </code></pre>
  
  <p>still no luck</p>