- matplotlib.pyplot 乱码
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus']=False
UMING_TTC = 'ttc/uming.ttc'
chinesefont = FontProperties(fname=UMING_TTC)
plt.xlabel(str('按钮'), fontproperties=chinesefont)
plt.ylabel(str('按钮数量'), fontproperties=chinesefont)
plt.title(str('按钮覆盖率'), fontproperties=chinesefont)
plt.legend(prop=chinesefont)
- 使用docker ubuntu20.04+python3.8+opencv4.4+pyQt5问题汇总
2.1 opencv与pyqt冲突问题
问题如下:![在这里插入图片描述](https://img-blog.csdnimg.cn/20201203192510337.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyNjkzODQ4,size_16,color_FFFFFF,t_70)
该问题已经三年了,opencv官网也没给出解决方案,见:https://stackoverflow.com/questions/52337870/python-opencv-error-current-thread-is-not-the-objects-thread