I recently upgraded from Python3.6 to Python3.7. Since I have upgraded, when I type in ipython3
in the terminal I get an error:
~$ ipython3
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/IPython/__init__.py", line 48, in <module>
from .core.application import Application
File "/usr/lib/python3/dist-packages/IPython/core/application.py", line 25, in <module>
from IPython.core import release, crashhandler
File "/usr/lib/python3/dist-packages/IPython/core/crashhandler.py", line 28, in <module>
from IPython.core import ultratb
File "/usr/lib/python3/dist-packages/IPython/core/ultratb.py", line 124, in <module>
from IPython.utils import path as util_path
File "/usr/lib/python3/dist-packages/IPython/utils/path.py", line 18, in <module>
from IPython.utils.process import system
File "/usr/lib/python3/dist-packages/IPython/utils/process.py", line 19, in <module>
from ._process_posix import system, getoutput, arg_split, check_pid
File "/usr/lib/python3/dist-packages/IPython/utils/_process_posix.py", line 24, in <module>
import pexpect
File "/usr/lib/python3/dist-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 14, in <module>
from .spawnbase import SpawnBase
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Furthermore I have noticed that my jupyter-notebook does not seem to work with the python3 kernel now as well (I get the kernel dead error).
NOTEs:
- ipython and jupyter-notebook are working with fine when I use them with Python2.
- I am using Ubuntu 18.04 (Bionic Beaver) although I don't think this is relevant