I installed opencv-python using pip install, in mac os. Now the cv2.imshow function giving following error
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 cvShowImage
How can I solve this issue? Why doesn't the pip check opencv dependencies?
Follow the below steps to install the Opencv 4 package on macOS using the setup.py file: Step 1: Download the latest source package of Opencv 4 for python3 from here. Step 2: Extract the downloaded package using the following command. Step 3: Go inside the folder and Enter the following command to install the package.
Installation of OpenCV on the M1The first step is to install Homebrew if you don't have it. Homebrew is a dependency manager for MacOS, and we will use it to install miniforge. Then we install miniforge using Homebrew. Next we can set up a new virtual environment called cv with python 3.8.
cv2. imshow() method is used to display an image in a window. The window automatically fits to the image size.
Seems launching imshow windows doesn't work when installing opencv-python from pypi. Instead remove that and follow the great instructions at http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/
(Note that no longer need to use --HEAD tag, as of 3.2.0)
In short:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With