看似缺少ipython模块试图使用带有anaconda的jupyter笔记本

时间:2016-11-11 22:36:07

标签: ipython anaconda jupyter

打开jupyter笔记本时,出现以下错误。知道如何解决这个问题吗?我正在使用Anaconda 2在ubuntu 16.04上运行。尝试卸载并重新安装ipython并尝试通过pip和conda进行操作。没有帮助。

[E 13:52:02.191 NotebookApp] Unhandled error in API request
    Traceback (most recent call last):
      File "/home/user/anaconda2/lib/python2.7/site-packages/notebook/base/handlers.py", line 457, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "/home/user/anaconda2/lib/python2.7/site-packages/notebook/services/kernelspecs/handlers.py", line 56, in get
        for kernel_name in ksm.find_kernel_specs():
      File "/home/user/anaconda2/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 192, in find_kernel_specs
        kspecs = super(CondaKernelSpecManager, self).find_kernel_specs()
      File "/home/user/anaconda2/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 128, in find_kernel_specs
        for kernel_dir in self.kernel_dirs:
      File "/home/user/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py", line 554, in __get__
        return self.get(obj, cls)
      File "/home/user/anaconda2/lib/python2.7/site-packages/traitlets/traitlets.py", line 533, in get
        value = self._validate(obj, dynamic_default())
      File "/home/user/anaconda2/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 114, in _kernel_dirs_default
        from IPython.paths import get_ipython_dir
      File "/home/user/anaconda2/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
        from .core.application import Application
      File "/home/user/anaconda2/lib/python2.7/site-packages/IPython/core/application.py", line 25, in <module>
        from IPython.core import release, crashhandler
      File "/home/user/anaconda2/lib/python2.7/site-packages/IPython/core/crashhandler.py", line 28, in <module>
        from IPython.core import ultratb
      File "/home/user/anaconda2/lib/python2.7/site-packages/IPython/core/ultratb.py", line 131, in <module>
        import IPython.utils.colorable as colorable
    AttributeError: 'module' object has no attribute 'utils'
[E 13:52:02.192 NotebookApp] {
      "Accept-Language": "en-US,en;q=0.5", 
      "Accept-Encoding": "gzip, deflate", 
      "Host": "localhost:8888", 
      "Accept": "*/*", 
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0", 
      "Connection": "keep-alive", 
      "X-Requested-With": "XMLHttpRequest", 
      "Referer": "http://localhost:8888/tree"
    }
[E 13:52:02.192 NotebookApp] 500 GET /api/kernelspecs (127.0.0.1) 3.10ms referer=http://localhost:8888/tree

1 个答案:

答案 0 :(得分:0)

卸载Anaconda2并安装Anaconda3代替解决了这个问题。