# sieben @ sieben-macbook in ~ [15:26:04]
$ python3 --version
Python 3.7.2
# sieben @ sieben-macbook in ~ [15:26:11]
$ jupyter --version
4.4.0
# sieben @ sieben-macbook in ~ [15:26:16]
$ python3 -m jupyter notebook --version
5.7.4
# sieben @ sieben-macbook in ~ [15:26:25]
$ jupyter notebook
Traceback (most recent call last):
File "/Users/sieben/Library/Python/3.7/bin/jupyter-notebook", line 10, in <module>
sys.exit(main())
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/notebook/notebookapp.py", line 1628, in initialize
self.init_webapp()
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/notebook/notebookapp.py", line 1378, in init_webapp
self.jinja_environment_options,
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/notebook/notebookapp.py", line 159, in __init__
default_url, settings_overrides, jinja_env_options)
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/notebook/notebookapp.py", line 271, in init_settings
nbextensions_path=jupyter_app.nbextensions_path,
File "/Users/sieben/Library/Python/3.7/lib/python/site-packages/notebook/notebookapp.py", line 1061, in nbextensions_path
from IPython.paths import get_ipython_dir
File "/usr/local/lib/python3.7/site-packages/IPython/__init__.py", line 48, in <module>
from .core.application import Application
File "/usr/local/lib/python3.7/site-packages/IPython/core/application.py", line 25, in <module>
from IPython.core import release, crashhandler
File "/usr/local/lib/python3.7/site-packages/IPython/core/crashhandler.py", line 28, in <module>
from IPython.core import ultratb
File "/usr/local/lib/python3.7/site-packages/IPython/core/ultratb.py", line 124, in <module>
from IPython.utils import path as util_path
File "/usr/local/lib/python3.7/site-packages/IPython/utils/path.py", line 18, in <module>
from IPython.utils.process import system
File "/usr/local/lib/python3.7/site-packages/IPython/utils/process.py", line 19, in <module>
from ._process_posix import system, getoutput, arg_split, check_pid
File "/usr/local/lib/python3.7/site-packages/IPython/utils/_process_posix.py", line 24, in <module>
import pexpect
File "/usr/local/lib/python3.7/site-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/usr/local/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 14, in <module>
from .spawnbase import SpawnBase
File "/usr/local/lib/python3.7/site-packages/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Try
$pip uninstall pexpect
$pip install pexpect
It worked. Thank you very much :D
@liujl93 Thank so much for your help. i really appreciate man
this works
Try
$pip uninstall pexpect
$pip install -U pexpect
Thanks a lot. It worked. Can you let us know what caused the error? @liujl93
Most helpful comment
Try
$pip uninstall pexpect
$pip install pexpect