linux下python3.4配置matplotlib的问题
2016-04-13 17:23
621 查看
安装
问题
但是我在执行
会出现一个问题
在stackoverflow查到了解决方案
先在python中执行
结果就是matplotlib的配置文件matplotlibrc
编辑这个文件
把其中的backend : Gtk3Agg改成backend:TkAgg
当然这个前提 是你在机器上装过Tk的库
或者
把其中的backend : Gtk3Agg改成backend:qt5agg
这个也是要装点东西的..
然后就可以完美运行
在ubuntu下,直接apt-get install python3-matplotlib就安装了.
问题
但是我在执行
import matplotlib.pyplot as plt
会出现一个问题
The Gtk3Agg backend is known to not work on Python 3.x with pycairo
在stackoverflow查到了解决方案
先在python中执行
import matplotlib matplotlib.matplotlib_fname()
结果就是matplotlib的配置文件matplotlibrc
编辑这个文件
把其中的backend : Gtk3Agg改成backend:TkAgg
当然这个前提 是你在机器上装过Tk的库
或者
把其中的backend : Gtk3Agg改成backend:qt5agg
这个也是要装点东西的..
sudo apt-get install python3-pyqt5
然后就可以完美运行
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- ubuntu下chrome无法同步问题解决
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- Ubuntu Linux使用体验
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析