没有用sudo apt-get update 和sudo apt-get upgrade 时,sudo apt-get install python-matplotlib 不能正常安装;update and upgrade 之后,可以正常安装python-matplotlib,ipython numpy scipy [size=; font-size: 0.95em,0.95em]
[font=Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace]imagemagick 之后,还是不能在 ipython --pylab 之下,使用plot画图,错误代码如下:
[size=; font-size: 0.95em,0.95em]
[font=Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace]
:~# ipython --pylab
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
Type "copyright", "credits" or "license" for more information.
IPython 0.12.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Welcome to pylab, a matplotlib-based Python environment [backend: TkAgg].
For more information, type 'help(pylab)'.
[TerminalIPythonApp] Error in enabling GUI event loop integration:
---------------------------------------------------------------------------
TclError Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc
in
enable_pylab
(self, gui, import_all)
2600
# Now we must activate the gui pylab wants to use, and fix %run to take
2601
# plot updates into account
-> 2602
self
.enable_gui
(gui
)
2603 self
.magic_run
= self
._pylab_magic_run
2604
/usr/lib/python2.7/dist-packages/IPython/lib/inputhook.pyc
in
enable_gui
(gui, app)
480
e =
"Invalid GUI request %r, valid ones are:%s"
%
(
gui,
guis.
keys())
481
raise ValueError
(e
)
--> 482
return
gui_hook
(
app
)
483
/usr/lib/python2.7/dist-packages/IPython/lib/inputhook.pyc
in
enable_tk
(self, app)
306
if app
is None
:
307
import Tkinter
--> 308
app
= Tkinter
.Tk
()
309 app
.withdraw
()
310 self
._apps
[GUI_TK
]
= app
/usr/lib/python2.7/lib-tk/Tkinter.pyc
in
__init__(self, screenName, baseName, className, useTk, sync, use)
1686 baseName
= baseName
+ ext
1687 interactive
=
0
-> 1688
self
.tk
= _tkinter
.create
(screenName
, baseName
, className
, interactive
, wantobjects
, useTk
, sync
, use
)
1689
if useTk
:
1690 self
._loadtk
()
TclError: no display name and no $DISPLAY environment variable
In [
1]:
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。