Error reporting of OpenCV and Darknet under Python 2.7

Error reporting of OpenCV and Darknet under Python 2.7

Python 2.7 is run by default during the whole ROS. I don’t know how to adjust it, so Yolo can’t run. The following error is reported

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

The solution is to recompile opencv in the following order

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..

sudo make install

Read More: