-
Download SimHei.ttf
-
Double-click the SimHei font you just downloaded to open it, click install
-
Execute this command to search the matplotlibrc file
sudo find / -name matplotlibrc -
Modify configuration information
4.1 Edit matplotlibrc file
vim matplotlibrc
4.2 Modify data (CV is recommended)
font.family: sans-serif
font.sans-serif: SimHei
axes.unicode_minus: False -
Restart jupyter to get it
If this method cannot be
solved , it is recommended to clean up the cache rm -r ~/.cache/matplotlib