欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决:GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

程序员文章站 2024-03-02 08:57:52
...

错误:

GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

 

解决方式:

第一种:

OpenCV 编译时,使用cmake命令补充行:-DWITH_GTK_2_X=ON

 

第二种:

import matplotlib
matplotlib.use('Agg')
# matplotlib.use('TkAgg') # 两个选一个


import matplotlib.pyplot as plt
# .......

 

 

相关标签: OpenCV python