View: 1464|Reply: 1

No module named 'cv2'

[Copy link]

1

Threads

1

Posts

11

Credits

Newbie

Rank: 1

Credits
11
Post time 2022-5-28 00:55:13 | Show all posts |Read mode
Hello

I try to have the Picar-B robot working.I have plugged a RaspberryPi 4 model B. I heard some incompatibilities between them.
Anyway, I reached the execution of webServey.
This step ended with an error :

pi@raspberrypi:~ $ sudo python3 adeept_picar-b/server/webServer.py              ......................pause..........................
Traceback (most recent call last):
  File "/home/pi/adeept_picar-b/server/webServer.py", line 26, in <module>
    import app
  File "/home/pi/adeept_picar-b/server/app.py", line 8, in <module>
    from camera_opencv import Camera
  File "/home/pi/adeept_picar-b/server/camera_opencv.py", line 2, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

I have found nothing in the forum, but maybe I missed something.
Is there anybody who already faced this issue.

Thanks in advance for your help.
Regards.
OLivier
Reply

Use magic Report

1

Threads

3

Posts

13

Credits

Newbie

Rank: 1

Credits
13
Post time 2022-8-12 23:40:13 | Show all posts
I encountered the same issue.

1. Uninstall numpy
sudo pip3 uninstall numpy
2. Install opencv-python
sudo apt-get install libgraphite2-3 libatspi2.0-0 libthai0 libxcb-shm0 libxcb-render0 libswscale5 librsvg2-2 libvorbisenc2 libavutil56 libzvbi0 libgsm1 libxinerama1 libxvidcore4 libsrt1.4-gnutls libswresample3 libatk1.0-0 libvorbisfile3 libogg0 libpangoft2-1.0-0 libpgm-5.3-0 libwayland-egl1 libharfbuzz0b libpango-1.0-0 libcairo2 libva-x11-2 libwayland-cursor0 libgfortran5 libxfixes3 libgme0 libxrender1 libvorbis0a libxi6 libudfread0 libspeex1 libwebpmux3 libsodium23 libdatrie1 libatk-bridge2.0-0 libxrandr2 libbluray2 libx264-160 libwavpack1 libxcomposite1 libpangocairo-1.0-0 libsoxr0 libshine3 libxkbcommon0 libvdpau1 libgtk-3-0 libopus0 librabbitmq4 libgdk-pixbuf-2.0-0 libavformat58 libmpg123-0 libxdamage1 libzmq5 libdav1d4 libopenmpt0 libatlas3-base libva2 libva-drm2 libxcursor1 libssh-gcrypt-4 libavcodec58 libaom0 libx265-192 libwayland-client0 libcairo-gobject2 libcodec2-0.9 libpixman-1-0 libdrm2 libsnappy1v5 libnorm1 libopenjp2-7 libtheora0 ocl-icd-libopencl1 libtwolame0 libvpx6 libepoxy0 libchromaprint1 libmp3lame0
sudo pip3 install opencv-python

I wrote a little step-by-step guide to setup Raspclaws with latest Raspberry PI 4.
Maybe can be useful (https://www.adeept.com/forum/thread-866-1-1.html).
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules