Quickly solve the problem that jupyter does not support Chinese

  1. Download SimHei.ttf

  2. Double-click the SimHei font you just downloaded to open it, click install
    Insert picture description here

  3. Execute this command to search the matplotlibrc file
    sudo find / -name matplotlibrc

  4. 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

  5. Restart jupyter to get it
    Insert picture description here

If this method cannot be
solved , it is recommended to clean up the cache rm -r ~/.cache/matplotlib

Guess you like

Origin blog.csdn.net/qq_41475067/article/details/112973499