Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Conda environment opencv error cv2.error: what to do

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Conda environment opencv error cv2.error: what to do, I believe many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

When using opencv in a conda environment, the following error may be reported:

Cv2.error: OpenCV (4.4.0) / tmp/pip-req-build-dglzv4yn/opencv/modules/highgui/src/window.cpp:651: error: (- 2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'

After tossing about for most of the day, I finally found a solution from stack overflow. It's super simple. Record it.

First install opencv-python using pip in the conda environment

Pip install opencv-python

Then install pencv-contrib-python

Pip install opencv-contrib-python after reading the above, you have mastered the conda environment opencv error cv2.error: what to do? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report