[Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed

1. Question.
Python3.8 environment
When using pip3 to install opencv-python, there is a
[modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all’ failed


2. Cause.
When compiling in opencv-python, it cannot call python3.8 properly
3. Solution:
sudo apt-get install python3.8-dev
4. Successful installation

Read More: