似乎缺少尝试将蟒蛇笔记本与Anaconda结合使用的ipython模块 [英] Seemingly missing ipython module trying to use jupyter notebook with anaconda

查看:101
本文介绍了似乎缺少尝试将蟒蛇笔记本与Anaconda结合使用的ipython模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When opening a jupyter notebook, I get the following errors. Any idea how to fix this? I'm running on ubuntu 16.04 with Anaconda 2. Tried uninstalling and reinstalling ipython and tried doing that through both pip and conda. Didn't help.

[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

推荐答案

卸载Anaconda2并安装Anaconda3可以解决此问题.

Uninstalling Anaconda2 and installing Anaconda3 instead fixed this issue.

这篇关于似乎缺少尝试将蟒蛇笔记本与Anaconda结合使用的ipython模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆