First, the error description:
1, Environment:
MacOS 15
PyCharm
the OpenCV
2, using the description:
PyCharm used OpenCV cv2.VideoCapture (0) Mac native calls given camera
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
But can be used successfully in the terminal
3, error analysis:
MacOS Catalina new security agreement due, md more than three months PyCharm not solve the problem from the software, Pycharm also not issued dialog box to access the camera during a call
Second, to solve the problem:
Solution to authority terminal using a camera with an opening, open Pycharm authorization terminal indirectly, since Apple Terminal is authorized to use this paper: Iterm2
. 1, download and install Iterm2:
After downloading the application to drag
2 , a need to open the file using iTerm2 camera (OpenCV-python file can call the camera)
cd 文件夹位置
python 文件夹名称
3, using iTerm2 open Pycharm:
cd /Applications/PyCharm.app/Contents/MacOS
open pycharm
Then you can normally use
Third, the problem analysis:
1, this problem is Pycharm with Apple security policy, the process of the current government has made Apple supports.
2, this method does not completely solve this problem, each time using this method.
3, the last hope that we find a better solution.
Have reference https://blog.csdn.net/DerrickRose25/article/details/102997685#comments