AttributeError: модуль «ast» не имеет атрибута «AnnAssign» в блокноте Jupyter - PullRequest
0 голосов
/ 21 апреля 2019

Я только что установил Jupyter из pip3 на macOS. У меня были некоторые проблемы, поэтому я использовал export PATH="$HOME/Library/Python/3.6/bin:$PATH" для решения jupyter: command not found. Теперь, когда я запускаю jupyter notebook, я получаю это: -

Traceback (most recent call last):
  File "/Users/sarthak/Library/Python/3.6/bin/jupyter-notebook", line 10, in <module>
    sys.exit(main())
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "</Users/sarthak/Library/Python/3.6/lib/python/site-packages/decorator.py:decorator-gen-7>", line 2, in initialize
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/notebook/notebookapp.py", line 1630, in initialize
    self.init_webapp()
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/notebook/notebookapp.py", line 1378, in init_webapp
    self.jinja_environment_options,
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/notebook/notebookapp.py", line 159, in __init__
    default_url, settings_overrides, jinja_env_options)
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/notebook/notebookapp.py", line 271, in init_settings
    nbextensions_path=jupyter_app.nbextensions_path,
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/notebook/notebookapp.py", line 1061, in nbextensions_path
    from IPython.paths import get_ipython_dir
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/IPython/__init__.py", line 55, in <module>
    from .terminal.embed import embed
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/IPython/terminal/embed.py", line 15, in <module>
    from IPython.core.interactiveshell import DummyMod, InteractiveShell
  File "/Users/sarthak/Library/Python/3.6/lib/python/site-packages/IPython/core/interactiveshell.py", line 119, in <module>
    _assign_nodes         = (ast.AugAssign, ast.AnnAssign, ast.Assign)
AttributeError: module 'ast' has no attribute 'AnnAssign'

python -V возвращает Python 2.7.10

...