无法前往Jupiter Notebook和Jsonschema失踪

时间:2019-04-23 01:49:31

标签: python-3.x jupyter-notebook anaconda python-3.6 jupyter

在过去的一天里,我一直在解决MacBook Air的问题,但不幸的是,我再次遇到了更多问题。您以前可能已经看过这个问题,但是尝试了所有答案后,我无法解决这个问题

Can't use Jupyter Notebook: jsonschema apparently missing

基本上,我现在正尝试输入Jupyter Notebook。我(我想)有两个,一个是使用pip3(Python 3.6.0)安装的Jupyter Notebook,另一个是从Anaconda卸载的。对于Anaconda,尽管我根据他们的官方网站和其他几个Stack Overflow论坛使用了anaconda clean和rm功能,但我无法卸载BASH,所以我就把它留在那里,并使用pip3安装了Jupyter Notebook。但是当我在终端中键入Jupyter Notebook时,出现错误:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nbformat/validator.py", line 12, in <module>
    from jsonschema import ValidationError
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jsonschema/__init__.py", line 32, in <module>
    from pkg_resources import get_distribution
ImportError: cannot import name 'get_distribution'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/jupyter-notebook", line 6, in <module>
    from notebook.notebookapp import main
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notebook/notebookapp.py", line 83, in <module>
    from .services.contents.manager import ContentsManager
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 17, in <module>
    from nbformat import sign, validate as validate_nb, ValidationError
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nbformat/__init__.py", line 33, in <module>
    from .validator import validate, ValidationError
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nbformat/validator.py", line 23, in <module>
    raise ImportError(str(e) + verbose_msg)
ImportError: cannot import name 'get_distribution'

    Jupyter notebook format depends on the jsonschema package:

        https://pypi.python.org/pypi/jsonschema

    Please install it first.

我正在使用什么: MacOS High Sierra 10.13.6 Macbook Air 2011 i7 4GB内存 Python 3.6.0(安装Jupyter的pip3) 我在Python中安装的工具:Numpy,Pandas,Tensorflow,Keras

感谢您的帮助!如果可能,请指出任何错误或我可以改善此问题的方法。另外,尝试以不同于Can't use Jupyter Notebook: jsonschema apparently missing的方式回答解决方案。

0 个答案:

没有答案
相关问题