C++中调用python,import cv2出现段错误的解决办法

将opencv-python版本降低到3.2左右即可

opencv-python版本降低后在pycharm中运行python程序可能出现cv2.error: /io/opencv/modules/highgui/src/window.cpp:565: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow
哪位大神有两全奇美的办法欢迎评论

你可能感兴趣的:(python,c++,opencv)