无法在MacOS上为jupyter-notebook安装python2内核

时间:2018-09-13 00:45:24

标签: python jupyter-notebook jupyter

在尝试访问此页面时,我正在尝试在Macbook上为jupyter笔记本安装python2内核:

https://ipython.readthedocs.io/en/stable/install/kernel_install.html#kernels-for-python-2-and-3

..但是出现以下错误,对于像我这样的(某种)newb来说,这是相当隐秘的:

Alexandres-MBP ~ python2.7 -m ipykernel install
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/ipykernel/__main__.py", line 2, in <module>
    from ipykernel import kernelapp as app
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/ipykernel/kernelapp.py", line 38, in <module>
    from .iostream import IOPubThread
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/ipykernel/iostream.py", line 25, in <module>
    from jupyter_client.session import extract_header
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/jupyter_client/session.py", line 51, in <module>
    from dateutil.tz import tzutc
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/dateutil/tz/__init__.py", line 2, in <module>
    from .tz import *
  File "/Users/alex/Library/Python/2.7/lib/python/site-packages/dateutil/tz/tz.py", line 19, in <module>
    from six.moves import _thread
ImportError: cannot import name _thread

我该如何解决?

哦,关于Stack Overflow的第一篇文章,所以我希望在正确的位置提问。

编辑:忘记提及我用brew安装了所有软件。

0 个答案:

没有答案