Seemingly missing ipython module trying to use jupyter notebook with anaconda

纵然是瞬间 提交于 2019-12-25 04:27:28

问题


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

回答1:


Uninstalling Anaconda2 and installing Anaconda3 instead fixed this issue.



来源:https://stackoverflow.com/questions/40557294/seemingly-missing-ipython-module-trying-to-use-jupyter-notebook-with-anaconda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!