Python environment configuration for Anaconda

Source: Internet
Author: User
Tags gtk

Keyword: Anaconda opencv3 yum

I tried to run the catch_usb_video.py script (source: http://www.cnblogs.com/neo-T/p/6426029.html) in the Anaconda Python environment, and the results reported the following error:

OpenCV (3.4.1) error:unspecified Error (the function is not implemented. Rebuild the library with Windows, GTK + 2.x or Carbon support. If you is on Ubuntu or Debian, install Libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in Cvnamedwin Dow, File/opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/highgui/src/window.cpp, line 618
Traceback (most recent):
File "catch_viedo.py", line A, in <module>
Catchusbvideo ("Intercept video stream", Int (sys.argv[1]))
File "catch_viedo.py", line 6, in Catchusbvideo
Cv2.namedwindow (Window_name)
Cv2.error:OpenCV (3.4.1)/opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/highgui/src/window.cpp:618 : Error: ( -2) The function is not implemented. Rebuild the library with Windows, GTK + 2.x or Carbon support. If you is on Ubuntu or Debian, install Libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function CV Namedwindow

According to the results of online search:
1-Installing Libgnomeui-devel:yum install-y libgnomeui-devel
The result: This actually only applies to Ubuntu, then I deleted it, and it is because of this, I learned how Yum is to delete the package (back), and the package to download the installation of the dependency package is deleted,

Shows the history of installing that package Yum list Libgnomenui-devel
Loaded Plugins:fastestmirror, LangPacks
ID | Command Line | Date and Time | Action (s) | Altered
-------------------------------------------------------------------------------
4 | Install Libgnomeui-devel | 2018-07-19 20:59 |   Install | 89
History list

Then Yum history Undo is the column ID

2-Install the gtk2-devel, the result is still not solved, also is the estoppel installs

I tried to reload opencv3 by comparing other people's feedback on the web, so I executed the following command:
1.conda Remove OpenCV
2.conda List | grep OpenCV immediately after I checked the Conda also contains what OPENCV package, do not know whether the two packages have no effect, anyway also deleted, if someone also can try not to delete first, see the effect of the decision (^_^ message to tell me the result)
LIBOPENCV 3.4.1 H1a3b859_1 Defaults
PY-OPENCV 3.4.1 Py36h0676e08_1 Defaults

3.conda Remove Libopencv PY-OPENCV
4.conda Install Opencv3

At this point, the original Py script is running properly.

Python environment configuration for Anaconda

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.