1. 程式人生 > >Matplotlib is building the font cache using fc-list. This may take a moment解決辦法

Matplotlib is building the font cache using fc-list. This may take a moment解決辦法

這裡寫圖片描述
絕望了一晚上 因為這個錯誤,在網上扒了半天,終於解決了。
就到錯誤提示的目錄裡面找到font_manager.py檔案,將其大約在231行左右的direc = os.path.abspath(direc).lower() 改為:direc = direc.split(‘\0’, 1)[0]就可以解決了。
例如我這個錯誤的目錄就是/home/sebar/.local/lib/python3.5/site-packages/matplotlib/font_manager.py將這個修改,再重新啟動python就可以了。