Open CV Window Error

0 views
Skip to first unread message

david....@gmail.com

unread,
Mar 20, 2013, 10:48:27 AM3/20/13
to anaco...@continuum.io
Hello, I am trying to use OpenCV from the Anaconda install and it looks there is something that was hardcoded in there that probably shouldn't have been.  I get this error when trying to open a window.

cv2.error: /home/ilan/aroot/work/OpenCV-2.4.2/modules/highgui/src/window.cpp:602: 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 cvNamedWindow

I believe a main contributor to Anaconda is ilan.

My C foo isn't quite that good so I can't point to where the exact problem is, but I hope this helps.

-Dave

Dan Farmer

unread,
Apr 17, 2013, 7:39:09 PM4/17/13
to anac...@continuum.io, anaco...@continuum.io
Just to follow up that I have this issue as well, looks like OpenCV didn't have GTK's development headers/source so highgui didn't build. 

Can we get this rebuilt? I'd be happy to help (unfortunately I've built OpenCV about a million times), but I suspect that since this is your custom distribution system there isn't much I can do.

-Dan

Travis Oliphant

unread,
Apr 17, 2013, 8:48:11 PM4/17/13
to Dan Farmer, anac...@continuum.io
Hey Dan, 

Thanks for the suggestion and the offer to help.   We are currently working on ways to allow community contribution to the free binary packages available in Anaconda.   It should be easier to contribute in the future. 

We do need to fix our OpenCV packages. 

Thanks,

-Travis





--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/anaconda/?hl=en-US.
 
 



--
---
Travis Oliphant
Continuum Analytics, Inc.

Dan Farmer

unread,
Apr 17, 2013, 8:51:17 PM4/17/13
to anac...@continuum.io, Dan Farmer
You know after I sent that message I was reading through some more of the archives here and saw the VTK thread about someone installing there. I also went and read the conda docs (unfortunately the stuff about building packages doesn't seem to be there, but there was a blog post that gave a sketch of how to do it). So I think I might try making my own opencv package tonight. We'll see how it goes.

Thanks!

-Dan

Dan Farmer

unread,
Apr 18, 2013, 2:49:13 AM4/18/13
to anac...@continuum.io
Alright. sorry for all of the emails. I took a crack at this and actually got it to work without too much trouble.

I don't know if anyone wants to play with it, but here's a link to it on my Google Drive: https://docs.google.com/file/d/0BxxyQqqAUOryc2RfZm03c0JYdzA/edit?usp=sharing

It's a Linux x64 conda package for OpenCV 2.4.5 with ffmpeg and video4linux video support and highgui (imshow, etc) working. I don't know if this will also require getting rid of the Anaconda libm.so files like I had to (since presumably these will conflict). Anyway, it works for me. Thanks guys!

-Dan

joel.o...@gmail.com

unread,
Jan 12, 2015, 5:33:09 PM1/12/15
to anac...@continuum.io, anaco...@continuum.io, david....@gmail.com
Hi,
I tried installing opencv via conda a few days ago and ran into the same issues as the OP. I ended up building opencv from source and linking cv2.so manually which is working good.

However, for future installs it would be much smoother if I could install OpenCV directly via conda, so I wonder if there has been any progress on this issue, is it working for most users now or is there an open ticket somewhere? I am running Ubuntu 14.04 and Anaconda 2.1.0 with Python 2.7.9.

Joel Östblom

unread,
Jan 12, 2015, 5:35:02 PM1/12/15
to anac...@continuum.io, anaco...@continuum.io, david....@gmail.com
(got an error message after the first post, so im posting again)

Hi,
I tried installing opencv via conda a few days ago and ran into the same issues as the OP. I ended up building opencv from source and linking cv2.so manually which is working good.

However, for future installs it would be much smoother if I could install OpenCV directly via conda, so I wonder if there has been any progress on this issue, is it working for most users now or is there an open ticket somewhere? I am running Ubuntu 14.04 and Anaconda 2.1.0 with Python 2.7.9.

On Wednesday, March 20, 2013 at 10:48:27 AM UTC-4, david....@gmail.com wrote:

and...@andrewandrade.ca

unread,
Jun 29, 2015, 10:26:39 PM6/29/15
to anac...@continuum.io, anaco...@continuum.io, david....@gmail.com
Hi Joel,

How did you link cv2.so manually?  Do you have any instructions?

I am having the same problem.

Joel Östblom

unread,
Jul 5, 2015, 6:58:08 AM7/5/15
to anac...@continuum.io, anaco...@continuum.io, david....@gmail.com
Hi Andrew,

This was a while ago, but after reading through my notes, I believe I followed this procedure to build from source. Then, at the bottom of this page in the in openCV docs, I found some instructions regarding the cv2.so file:

Installation is over. All files are installed in /usr/local/ folder. But to use it, your Python should be able to find OpenCV module. You have two options for that.

  1. Move the module to any folder in Python Path : Python path can be found out by entering import sys;print sys.path in Python terminal. It will print out many locations. Move /usr/local/lib/python2.7/site-packages/cv2.so to any of this folder. For example,
    1 su mv /usr/local/lib/python2.7/site-packages/cv2.so /usr/lib/python2.7/site-packages
    But you will have to do this every time you install OpenCV.
  2. Add /usr/local/lib/python2.7/site-packages to the PYTHON_PATH: It is to be done only once. Just open/.bashrc and add following line to it, then log out and come back.
    1 export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
    Thus OpenCV installation is finished. Open a terminal and try import cv2.

Let me know how it goes.

--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to a topic in the Google Groups "Anaconda - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/anaconda/YDBWbh4cwZE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anaconda+u...@continuum.io.

To post to this group, send email to anac...@continuum.io.

Andrew Andrade

unread,
Jul 6, 2015, 11:40:48 AM7/6/15
to anac...@continuum.io, anaco...@continuum.io, david....@gmail.com
Thanks!  I ended up building from source and using my local version of python instead of using Anaconda.

seanm...@gmail.com

unread,
Aug 26, 2015, 3:19:59 PM8/26/15
to Anaconda - Public, anaco...@continuum.io, david....@gmail.com
Same issue here. I am currently building openCV from scratch (and thus will likely be running from my native python...). It would be AMAZING if conda could support GTK with its openCV install so we can get imshow() functionality.
Reply all
Reply to author
Forward
0 new messages