18

I'm trying to install opencv on my Ubuntu 15.04 server. I'm using the conda package manager.

conda install -c https://conda.binstar.org/menpo opencv3

When I try importing cv2, the Python package, I get the following error.

ImportError: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

How do I install this dependency? I tried apt-get installing libgtk-x11-2.0.so.0 but it doesn't seem to exist.

Thanks!

23

At least in Ubuntu 16.04, libgtk2.0-0 contains libgtk-x11-2.0.so.0, so this works:

apt-get install libgtk2.0-0
  • it works. thanks. I spent a lot of time to get to here – zono Sep 4 '17 at 14:47
  • BEWARE. I only copied apt-get install libgtk2.0- and that removed almost all of my system. – Ondra Žižka Aug 4 '18 at 19:14
  • 1
    Didn't work in Ubuntu 18.04. – Ondra Žižka Aug 4 '18 at 20:55

protected by Community Dec 2 '18 at 22:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.