Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ipython Notebook - ImportError: tornado

I have already updated tornado using

sudo pip install --upgrade tornado

Checking the current version show that I already have a version later than 4.0

Find the output of command:

pip show tornado | grep Version

Metadata-Version: 1.1
Version: 4.1

Any idea why Ipython notebook does not work and keeps giving me the message that i do not have tornado v4.1 and have version 3.0 instead ?. Thanks and Regards.

========================================================================= $ipython notebook

Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 11, in <module>
    sys.exit(start_ipython())
  File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py", line 120, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 573, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 321, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/core/application.py", line 369, in initialize
    self.parse_command_line(argv)
  File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 471, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 402, in initialize_subcommand
    subapp = import_item(subapp)
  File "/usr/local/lib/python2.7/dist-packages/IPython/utils/importstring.py", line 42, in import_item
    module = __import__(package, fromlist=[obj])
  File "/usr/local/lib/python2.7/dist-packages/IPython/html/notebookapp.py", line 50, in <module>
    raise ImportError(msg + ", but you have %s" % tornado.version)
ImportError: The IPython Notebook requires tornado >= 4.0, but you have 3.2
like image 485
Gustavo Avila Avatar asked Mar 16 '23 06:03

Gustavo Avila


1 Answers

I had a conflicting copy of tornado (3.1.1 on ubuntu 14.04) as well. To see if this is the case for you, in a terminal use the commands:

apt-cache policy python-tornado

To print out the OS's version. If it is not the version you want, use:

sudo apt-get remove python-tornado

to remove it. If you had already installed the newer version using pip, that version will be visible to python now.

like image 133
chepyle Avatar answered Mar 29 '23 13:03

chepyle