编辑:这个例子直接来自" ein" emacs中的ipython笔记本文档:https://github.com/tkf/emacs-ipython-notebook
在Mac OS Yosemite上全新安装ipython:
ipython
Python 2.7.9 (default, Feb 12 2015, 17:01:13) Type "copyright", "credits" or "license" for more information. IPython 3.1.0 -- 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.
In [1]: %pylab
Using matplotlib backend: MacOSX Populating the interactive namespace from numpy and matplotlib
In [2]: dir(pylab)
长时间喷出,但我确认'plot'
在列表中
In [3]: from pylab import plot
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-3-8618f02f2b7e> in <module>() ----> 1 from pylab import plot ImportError: cannot import name plot
不知道出了什么问题。用Google搜索确切的错误消息,并没有看到任何有用的信息。