Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when upgrading Spyder to 4.0.1: ModuleNotFoundError: No module named 'IPython.core.inputtransformer2'

I recently upgraded to Spyder 4.0.1 through Anaconda via conda update spyder. Now, when I try to boot up Spyder via Anaconda Navigator, the program automatically crashes with the following dump:

Traceback (most recent call last):
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 3718, in main
mainwindow = run_spyder(app, options, args)
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 3559, in run_spyder
main.setup()
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 1010, in setup
from spyder.plugins.ipythonconsole.plugin import IPythonConsole
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/plugins/ipythonconsole/plugin.py", line 52, in 
from spyder.plugins.ipythonconsole.widgets import ClientWidget
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/plugins/ipythonconsole/widgets/__init__.py", line 16, in 
from .debugging import DebuggingWidget
File "/Users/ed/anaconda/lib/python3.6/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 22, in 
from IPython.core.inputtransformer2 import TransformerManager
ModuleNotFoundError: No module named 'IPython.core.inputtransformer2'

I couldn't find anybody with a similar error. I updated IPython, as someone suggested, but it did not resolve the problem. Any ideas?

like image 374
Parseltongue Avatar asked Jan 13 '20 20:01

Parseltongue


2 Answers

... since none of this worked for me, here how I solved it:

  1. check what IPython version you have via conda list

    in my case i got a rather old version 5.8.0 instead of the most recent one
    (at the time of writing 7.19.0... check available versions via conda search ipython)

  2. since conda update ipython did not provide the most recent version, i decided to manually run the command that installs the most recent version
    (for me this was conda install -c conda-forge ipython=7.19.0)

  3. that's it...

like image 111
raphael Avatar answered Sep 23 '22 11:09

raphael


I had the same problem. Upgrading IPython via the following command line helped resolve the situation.

sudo conda update IPython -n xxx

where xxx is the name of the environment I was trying to run Spyder in.

like image 33
Ali Khalili Avatar answered Sep 23 '22 11:09

Ali Khalili