0

I follow this URL read.md (https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Raspberry_Pi_Guide.md)

But,I encounter error.

python3 TFLite_detection_webcam.py --modeldir=Sample_TFLite_model

error below

no module named cv2

I only engaged in readmd.So, opencv include pip list. opencv_version:3.4.6.27 python_version:3.7.0

Could you tell me what is wrong Thank you.

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
  • Can you give us the result of `python3 -m pip freeze` please? Often pip command is linked to another python script. – Vincent Bénet Oct 18 '21 at 09:08
  • follow:backports.entry-points-selectable==1.1.0 distlib==0.3.3 filelock==3.3.1 importlib-metadata==4.8.1 opencv-python==4.5.3.56 platformdirs==2.4.0 typing-extensions==3.10.0.2 virtualenv==20.8.1 zipp==3.6.0 – Ryotaro Harada Oct 19 '21 at 03:54
  • https://stackoverflow.com/questions/37776228/pycharm-python-opencv-and-cv2-install-error – Stu Sutcliffe Jan 22 '22 at 10:13

1 Answers1

0

According to your comment answer, you don t have pip linked to your python3. Test to do this:

python3 -m pip install cv2

Then retry the command

python3 TFLite_detection_webcam.py --modeldir=Sample_TFLite_model
Vincent Bénet
  • 1,212
  • 6
  • 20
  • I tried this morning. but, this error occoured 'ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none) ERROR: No matching distribution found for cv2 – Ryotaro Harada Oct 20 '21 at 00:03
  • and another error below,' File "TFLite_detection_webcam.py", line 19, in import cv2 File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 5, in from .cv2 import * ImportError: numpy.core.multiarray failed to import – Ryotaro Harada Oct 20 '21 at 00:05
  • This is another error, please update your question now. Try to install numpy using same command – Vincent Bénet Oct 21 '21 at 07:34