글을 찾아보는데 대부분이 Xwin 시절의 내용이라
죄다 X로 돌리는건데.. wayland 쓰는 환경이라 안되서 이래저래 멘붕중
>>> cv2.imshow("tt",img) qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "/usr/local/lib/python3.12/site-packages/cv2/qt/plugins" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: xcb. |
opencv headless 를 설치하면 된다는데
$ pip install opencv-python-headless |
[링크 : https://shuka.tistory.com/62]
막상해보면 not implemented 라고 나오면서 실행이 안될뿐이고 (머.. xcb 에러를 안 뱉으니 된다고 해야하나?)
>>> cv2.imshow("tt",img) Traceback (most recent call last): File "<stdin>", line 1, in <module> cv2.error: OpenCV(4.9.0) /io/opencv/modules/highgui/src/window.cpp:1272: 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' |
$ env | grep -i way XDG_SESSION_TYPE=wayland XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.V6LHN2 WAYLAND_DISPLAY=wayland-0 $ env | grep -i xdg XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_MENU_PREFIX=gnome- XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_SESSION_CLASS=user XDG_RUNTIME_DIR=/run/user/1000 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop |
docker run -e XDG_RUNTIME_DIR=/tmp \ -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \ -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \ --user=$(id -u):$(id -g) \ imagename waylandapplication |
[링크 : https://github.com/mviereck/x11docker/wiki/How-to-provide-Wayland-socket-to-docker-container]
'프로그램 사용 > docker' 카테고리의 다른 글
docker permission denied (0) | 2024.05.08 |
---|---|
docker start / stop (0) | 2024.05.08 |
docker attach / detach (0) | 2024.05.08 |
docker 이미지 이름 주기 (0) | 2024.05.08 |
docker 이미지 만들기 (0) | 2024.05.08 |