我运行 Windows 7,Enthought Python Distribution 7.3-2 Academic。
我打开一个命令提示符,切换到我的代码目录并输入
U:\rsch>ipython notebook
在新笔记本中,我输入%pylab
并收到以下错误:
In [1]: %pylab
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
U:\rsch\<ipython-input-1-5c1faa999e5b> in <module>()
----> 1 get_ipython().magic(u'pylab')
D:\Python27\lib\site-packages\IPython\core\interactiveshell.pyc in magic(self, arg_s, next_input)
1983 self._magic_locals = sys._getframe(1).f_locals
1984 with self.builtin_trap:
-> 1985 result = fn(magic_args)
1986 # Ensure we're not keeping object references around:
1987 self._magic_locals = {}
D:\Python27\lib\site-packages\IPython\core\magic.pyc in magic_pylab(self, s)
3471 import_all_status = True
3472
-> 3473 self.shell.enable_pylab(s, import_all=import_all_status)
3474
3475 def magic_tb(self, s):
D:\Python27\lib\site-packages\IPython\core\interactiveshell.pyc in enable_pylab(self, gui, import_all)
2592 ns = {}
2593 try:
-> 2594 gui = pylab_activate(ns, gui, import_all, self)
2595 except KeyError:
2596 error("Backend %r not supported" % gui)
D:\Python27\lib\site-packages\IPython\core\pylabtools.pyc in pylab_activate(user_ns, gui, import_all, shell)
327 itself, and will be needed next to configure IPython's gui integration.
328 """
--> 329 gui, backend = find_gui_and_backend(gui)
330 activate_matplotlib(backend)
331 import_pylab(user_ns, import_all)
D:\Python27\lib\site-packages\IPython\core\pylabtools.pyc in find_gui_and_backend(gui)
194 """
195
--> 196 import matplotlib
197
198 if gui and gui != 'auto':
D:\Python27\lib\site-packages\matplotlib\__init__.py in <module>()
131 import sys, os, tempfile
132
--> 133 from matplotlib.rcsetup import (defaultParams,
134 validate_backend,
135 validate_toolbar,
D:\Python27\lib\site-packages\matplotlib\rcsetup.py in <module>()
17 import warnings
18 from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
---> 19 from matplotlib.colors import is_color_like
20
21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
D:\Python27\lib\site-packages\matplotlib\colors.py in <module>()
50 """
51 import re
---> 52 import numpy as np
53 from numpy import ma
54 import matplotlib.cbook as cbook
D:\Python27\lib\site-packages\numpy\__init__.pyc in <module>()
141 return loader(*packages, **options)
142
--> 143 import add_newdocs
144 __all__ = ['add_newdocs']
145
D:\Python27\lib\site-packages\numpy\add_newdocs.py in <module>()
7 # core/fromnumeric.py, core/defmatrix.py up-to-date.
8
----> 9 from numpy.lib import add_newdoc
10
11 ###############################################################################
D:\Python27\lib\site-packages\numpy\lib\__init__.py in <module>()
11
12 import scimath as emath
---> 13 from polynomial import *
14 #import convertcode
15 from utils import *
D:\Python27\lib\site-packages\numpy\lib\polynomial.py in <module>()
15 from numpy.lib.function_base import trim_zeros, sort_complex
16 from numpy.lib.type_check import iscomplex, real, imag
---> 17 from numpy.linalg import eigvals, lstsq
18
19 class RankWarning(UserWarning):
D:\Python27\lib\site-packages\numpy\linalg\__init__.py in <module>()
46 from info import __doc__
47
---> 48 from linalg import *
49
50 from numpy.testing import Tester
D:\Python27\lib\site-packages\numpy\linalg\linalg.py in <module>()
21 isfinite, size, finfo, absolute, log, exp
22 from numpy.lib import triu
---> 23 from numpy.linalg import lapack_lite
24 from numpy.matrixlib.defmatrix import matrix_power
25 from numpy.compat import asbytes
ImportError: DLL load failed: The specified path is invalid.
不知道该怎么办。谢谢。