CentOS中python输入import matplotlib.pyplot提示有错误
来源:互联网 发布:域名根目录 编辑:程序博客网 时间:2024/05/29 08:55
在CentOS中安装matplotlib(使用命令yum install Python-matplotlib)后,在试图导入pyplot后报错:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line 78, in <module>
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
globals(),locals(),[backend_name])
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py", line 11, in <module>
raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed.
此时可以这样解决:
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import *
- CentOS中python输入import matplotlib.pyplot提示有错误
- CentOS中python输入import matplotlib.pyplot提示有错误
- python import matplotlib.pyplot 提示找不到DLL
- import matplotlib.pyplot 错误
- Python安装时import matplotlib.pyplot as plt报错
- Python安装时import matplotlib.pyplot as plt报错
- Python:matplotlib中pyplot的使用方法
- python matplotlib.pyplot importerror
- 【python】matplotlib.pyplot介绍
- Python---matplotlib.pyplot
- 【python】matplotlib.pyplot入门
- python之Matplotlib.pyplot
- import matplotlib.pyplot as plt 出错
- from matplotlib import pyplot 报错处理
- Python篇(二):matplotlib中pyplot的使用简介
- Python matplotlib简介 Pyplot教程
- Python 2.7 import matplotlib出现UnicodeDecodeError错误
- Mac下安装from matplotlib import pyplot或者 import matplotlib.pyplot as plt报错
- redis-cluster 性能调优
- Ubuntu 14.04+ kinect1(转载)
- Strace 命令使用 gcc
- 第一次使用Android Studio时你应该知道的一切配置
- 3D数学基础 第5章分析
- CentOS中python输入import matplotlib.pyplot提示有错误
- 【总结】C++前置声明
- 极小人脸检测
- mysql中四大连接 内连接、左外连接、右外连接、外连接
- jsp原理
- Windows下获取文件夹中特定后缀的所有文件名
- 人脸特征,检测与识别
- 全球第一个区块链小镇近日正式落户中国贵州贵安新区
- 块状元素和行内元素