error: -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp:501: 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 cvShowImage
使用conda虛擬環境,cv2.imshow報錯. 提示需要重新編譯opencv.
不要按照提示信息去搞什么編譯
進入conda虛擬環境,執行pip install opencv-python==3.4.5.20,重新安裝一次opencv-python就行了. 可能是conda原先默認安裝的不帶ui支持,所以cv2.imshow無法使用.
不知道想裝哪個版本,隨便輸一個,會有提示告訴你現在有哪些版本的.
(venv_python3.6) sc@sc-XPS-15-9570:~$ pip install opencv-python3.4
Collecting opencv-python3.4
Could not find a version that satisfies the requirement opencv-python3.4 (from versions: 3.1.0.4, 3.1.0.5, 3.2.0.6, 3.2.0.7, 3.2.0.8, 3.3.0.9, 3.3.0.10, 3.3.1.11, 3.4.0.12, 3.4.0.14, 3.4.1.15, 3.4.2.16, 3.4.2.17, 3.4.3.18, 3.4.4.19, 3.4.5.20, 4.0.0.21, 4.0.1.23, 4.0.1.24, 4.1.0.25)
No matching distribution found for opencv-python3.4