Posts: 1
Joined: Sun Dec 01, 2013 4:08 pm

OpenCV + Python GTK Warning

Sun Dec 01, 2013 4:16 pm


I'm new with the Raspberry and I'm trying to use the OpenCV lib in python.

But everytime that I try to run some code, I get this message:

"GTK Warning* Cannot open display".

I've been reinstalled everything almost 10 times, but always is returned this warning.

Anyone knows how to fix this?


Posts: 11
Joined: Mon Dec 01, 2014 3:46 am

Re: OpenCV + Python GTK Warning

Thu May 21, 2015 6:55 am

I had this error when running my openCV app from the command interface.

I expected it to work, since Raspivid preview worked from there.


Code: Select all

I ran my openCV code from the terminal from within the desktop gui, and was able to see what I needed.

Would be nice to not have to rely on the full desktop environment, but it seems the openCV library uses it to draw windows.

Return to “Python”