您的位置:首页 > 编程语言 > PHP开发

tensorflow安装matplotlib踩过的坑

2018-01-28 01:43 183 查看
1、pip安装matplotlib之后,会在根目录下产生一个.matplotlib的目录:

➜ bin ll ~/.matplotlib

total 280

-rw-r--r-- 1 me staff 78K 10 4 2015 fontList.cache

-rw-r--r-- 1 me staff 59K 1 17 15:56 fontList.py3k.cache

drwxr-xr-x 2 me staff 68B 10 4 2015 tex.cache

 

2、在这个目录下创建一个名为matplotlibrc的文件,内容是:

backend: TkAgg

然后保存退出,重启Python交互界面或重新运行脚本,import正常执行。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: