Based of this post, I have tried to install the below package at first step:
sudo apt-get update && sudo apt-get upgrade
sudo apt install cmake pkg-config build-essential git
sudo apt install libwebp-dev libjasper-dev libopenexr-dev libv4l-dev libavformat-dev
sudo apt install libxvidcore-dev libx264-dev libdc1394-22-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libavcodec-dev
sudo apt install libtiff-dev libpng-dev libjpeg-dev libswscale-dev
sudo apt install libhdf5-dev libhdf5-103
sudo apt install libgtk-3-dev libqtwebkit4 libqt4-test libqtgui4 python3-pyqt5
sudo apt install python3-dev python3-pip python3-testresources python3-numpy
but, I have get below error for installing the OpenCV by the pip install tqdm opencv-python imutils dlib imageio
command (reference) :
pi@raspberrypi:~ $ pip install tqdm opencv-python imutils dlib imageio #-y
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting tqdm
Using cached https://files.pythonhosted.org/packages/7a/ec/f8ff3ccfc4e59ce619a66a0bf29dc3b49c2e8c07de29d572e191c006eaa2/tqdm-4.61.2-py2.py3-none-any.whl
Collecting opencv-python
Using cached https://files.pythonhosted.org/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-C24u7o/opencv-python/setup.py", line 448, in <module>
main()
File "/tmp/pip-install-C24u7o/opencv-python/setup.py", line 99, in main
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
File "/usr/lib/python2.7/re.py", line 210, in escape
s = list(pattern)
TypeError: 'NoneType' object is not iterable
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-C24u7o/opencv-python/
So, if possible, I asked here to have some comment for fixing it.
Thanks.