在Ubuntu上导入matplotlib

所以我下载并安装了matplotlib。 奇怪的是,当我把它们放在home / user / Desktop中的时候,我可以很好地运行这些例子,但是当我将它们移动到home / user / Documents时,它们停止工作,我收到下面的消息。 有什么特别的文件文件夹,他们阻止matplotlib导入?

Traceback (most recent call last): File "contour_manual.py",line 4,in <module> import matplotlib.pyplot as plt File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py",line 23,in <module> from matplotlib.figure import figure,figaspect File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py",line 18,in <module> from axes import Axes,subplotBase,subplot_class_factory File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes.py",line 8454,in <module> subplot = subplot_class_factory() File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes.py",line 8446,in subplot_class_factory new_class = new.classobj("%ssubplot" % (axes_class.__name__),AttributeError: 'module' object has no attribute 'classobj'

RuntimeError:无效的disPLAYvariables

Tkinter / matplotlib osx上的多个活动窗口

禁用Python / Matplotlib的OpenGL

在Python 2.6中导入Pylab的问题

我该如何解决这个错误? Gtk-WARNING **:GModule …初始化检查失败:GLib版本太旧(微不匹配)

你的Documents文件夹中有没有文件new.py ? 如果有,请尝试将其重命名为其他内容

matplotlib模块的axes.py导入new的文件,如果你的Documents文件夹中有一个new.py文件,那么Python会加载它,而不是内置的new模块。

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....