Install simhei font on ubuntu20.04---Jupyter Chinese display frame solution

The Chinese font in jupyter displays the frame, the solution:

1. Download the simhei.ttf font:
add link description
2. Put the font in a suitable place

sudo cp SimHei.ttf /usr/share/fonts/

3. Delete matplotlib cache-edit in jupyter to
see where the cache files are.
Insert picture description here
In the terminal, cd to the directory to delete the cache
Insert picture description here
. 4.
Modify the configuration of matplotlib-edit in jupyter
Insert picture description here
to the terminal, edit the file matplotlibrc, add:

font.family:sans-serif
font.sans-serif:SimHei
axes.unicode_minus:False

5.jupyter restart service
Insert picture description here

Guess you like

Origin blog.csdn.net/BigData_Mining/article/details/111656101