UserWarning: Glyph 27668 (\N{CJK UNIFIED IDEOGRAPH-6C14}) missing from current font.

简介: UserWarning: Glyph 27668 (\N{CJK UNIFIED IDEOGRAPH-6C14}) missing from current font.

解决字符显示问题的一个有效方法是安装支持更广泛的Unicode字符集的字体。对于中文字符,您可以考虑以下几种解决方案:


  1. 安装中文字体:确保您的系统或应用程序安装了支持中文的字体。常见的中文字体包括“宋体”、“黑体”、“微软雅黑”和“楷体”。


  1. 更改应用程序设置:在某些应用程序中,您可能需要手动设置使用特定的字体。例如,在Python的matplotlib库中,您可以通过以下代码指定字体来确保中文能正确显示:

python


import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] # 设置字体为黑体 plt.rcParams['axes.unicode_minus'] = False # 正确显示负号

注意:SimHei 字体可能需要先安装在您的系统上。


  1. 更新或安装字体包:如果您使用的是Linux系统,可以安装中文字体包。例如,在Ubuntu系统上,您可以使用以下命令安装中文字体:
    bash
    sudo apt-get install fonts-wqy-zenhei


  1. 使用在线平台或应用:如果您是在一些在线平台(如Jupyter Notebook)上遇到这个问题,可能需要根据平台的具体指导来调整字体设置。


from pylab import mpl

mpl.rcParams["font.sans-serif"] = ["SimHei"]   # 设置显示中文字体

mpl.rcParams["axes.unicode_minus"] = False   # 设置正常显示符号




相关文章
ERROR: No matching distribution found for gradio>=3.23
该博客文章提供了解决使用pip安装gradio版本3.23时出现的"No matching distribution found"错误的步骤,包括从官网下载相应的whl文件并手动安装。
ERROR: No matching distribution found for gradio>=3.23
RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
2543 0
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from current font. FigureCanvasA
UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from current font. FigureCanvasA
UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from current font. FigureCanvasA
|
机器学习/深度学习 PyTorch 算法框架/工具
【完美解决】RuntimeError: one of the variables needed for gradient computation has been modified by an inp
将loss.backward()函数内的参数retain_graph值设置为True, loss.backward(retain_graph=True),如果retain_graph设置为False,计算过程中的中间变量使用完即被释放掉。
1683 0
|
数据可视化 数据挖掘 开发者
Data-Basic Statistical Descriptions of Data| 学习笔记
快速学习 Data-Basic Statistical Descriptions of Data。
Data-Basic Statistical Descriptions of Data| 学习笔记
|
Python
解决办法:RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96
解决办法:RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96
577 0
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
|
云计算
Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent
Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent
520 0
Google Earth Engine(GEE)——Error: Exported bands must have compatible data types; found inconsistent
成功解决 ValueError: feature_names mismatch training data did not have the following fields
成功解决 ValueError: feature_names mismatch training data did not have the following fields