Nach dem Update auf 20.04 war das Python-Paket opencv verschwunden. Ich wollte es wieder installieren und bekam einen seltsamen Fehler:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | sudo apt install python3-opencv Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies. python3-opencv : Depends: libopencv-calib3d4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-features2d4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-highgui4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-imgcodecs4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-objdetect4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-shape4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-stitching4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-superres4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-video4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-videoio4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-videostab4.2 (= 4.2.0+dfsg-5) but it is not going to be installed Depends: libopencv-contrib4.2 (>= 4.2.0+dfsg) but it is not going to be installed E: Unable to correct problems, you have held broken packages. |
Ich hab dann festgestellt, dass es daran lag, dass das Paket gdal-data in einer alten Version vorlag. Nachdem ich gdal-data noch einmal installiert habe, liess sich python3-opencv installieren. Aber es funktioniert nicht:
import cv2 ImportError: /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.2: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE
Ist das ein Bug?