You are not logged in.

#1 2016-11-10 09:56:43

Gaidar.OS
Member
Registered: 2016-11-10
Posts: 2

Python and OpenCV Problem

Hi,

I have python 3.5 and OpenCV 3.1 installed in the system.
I installed both python and opencv from their packages in the repos

$python
Python 3.5.2 (default, Jun 28 2016, 08:46:01)
[GCC 6.1.1 20160602] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.1.0'
>>> cv2.__file__
'/usr/lib/python3.5/site-packages/cv2/cv2.cpython-35m-x86_64-linux-gnu.so'
>>>

In the IDLE it seems to work fine but when i try to run a script it gives me the following error.
If it is some problem with the dependencies shouldn't it be automatically solved during installation?

tests$ python Sobel\ and\ Canny.py     
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 cvNamedWindow, file /io/opencv/modules/highgui/src/window.cpp, line 527
Traceback (most recent call last):
  File "Sobel and Canny.py", line 107, in <module>
    out = Canny(img)
  File "Sobel and Canny.py", line 54, in Canny
    cv2.namedWindow('Canny')
cv2.error: /io/opencv/modules/highgui/src/window.cpp:527: 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

[Finished in 0.5s with exit code 1]

I've searched for quite some time now and unfortunately every solution that i found was for python2 and/or opencv2.4. Does anyone have an idea or a reference that could help me solve this issue?
If it relevant I'm running Cinnamon as DE and have Nvidia drivers, although i get the same error in an AMD laptop.

Last edited by Gaidar.OS (2016-11-10 10:41:20)

Offline

Board footer

Powered by FluxBB