Notebook: Can't start jupyter in python3.7 after installed using pip on ubuntu 16.04

Created on 25 Feb 2019  路  1Comment  路  Source: jupyter/notebook

I installed jupyter notebook by the command:
python3.7 -m pip install jupyter

The error information:

$ jupyter notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, *kwargs)
File "/usr/local/lib/python3.7/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.7/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, *
kwargs)
File "/usr/local/lib/python3.7/dist-packages/notebook/notebookapp.py", line 1628, in initialize
self.init_webapp()
File "/usr/local/lib/python3.7/dist-packages/notebook/notebookapp.py", line 1378, in init_webapp
self.jinja_environment_options,
File "/usr/local/lib/python3.7/dist-packages/notebook/notebookapp.py", line 159, in __init__
default_url, settings_overrides, jinja_env_options)
File "/usr/local/lib/python3.7/dist-packages/notebook/notebookapp.py", line 271, in init_settings
nbextensions_path=jupyter_app.nbextensions_path,
File "/usr/local/lib/python3.7/dist-packages/notebook/notebookapp.py", line 1061, in nbextensions_path
from IPython.paths import get_ipython_dir
File "/usr/local/lib/python3.7/dist-packages/IPython/__init__.py", line 54, in
from .core.application import Application
File "/usr/local/lib/python3.7/dist-packages/IPython/core/application.py", line 25, in
from IPython.core import release, crashhandler
File "/usr/local/lib/python3.7/dist-packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/usr/local/lib/python3.7/dist-packages/IPython/core/ultratb.py", line 119, in
from IPython.utils import path as util_path
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/path.py", line 17, in
from IPython.utils.process import system
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/process.py", line 19, in
from ._process_posix import system, getoutput, arg_split, check_pid
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/_process_posix.py", line 23, in
import pexpect
File "/usr/lib/python3/dist-packages/pexpect/__init__.py", line 75, in
from .pty_spawn import spawn, spawnu
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 15, in
from .spawnbase import SpawnBase
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax

Most helpful comment

I just solved this problem by upgrading pexpect :)

Download pexpect4.6 source code from https://github.com/pexpect/pexpect/releases/tag/4.6

Extract the source code, get into the folder and install the pexpect by sudo python3.7 setup.py install

>All comments

I just solved this problem by upgrading pexpect :)

Download pexpect4.6 source code from https://github.com/pexpect/pexpect/releases/tag/4.6

Extract the source code, get into the folder and install the pexpect by sudo python3.7 setup.py install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

md-jamal picture md-jamal  路  3Comments

Foadsf picture Foadsf  路  3Comments

fonnesbeck picture fonnesbeck  路  3Comments

jonatanblue picture jonatanblue  路  3Comments

cancan101 picture cancan101  路  3Comments