Ich habe IPython installiert mit
sudo apt-get install ipython ipython-notebook
Aber beim Versuch, es zu starten, beschwert es sich, dass einige Komponenten nicht gefunden werden:
sudo ipython notebook
Traceback (most recent call last):
File "/usr/bin/ipython", line 5, in <module>
start_ipython()
File "/usr/lib/python2.7/dist-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 564, in launch_instance
app.initialize(argv)
File "<decorator-gen-110>", line 2, in initialize
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/core/application.py", line 381, in initialize
self.parse_command_line(argv)
File "/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<decorator-gen-4>", line 2, in parse_command_line
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 475, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<decorator-gen-3>", line 2, in initialize_subcommand
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 406, in initialize_subcommand
subapp = import_item(subapp)
File "/usr/lib/python2.7/dist-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/usr/lib/python2.7/dist-packages/IPython/html/notebookapp.py", line 62, in <module>
from tornado import httpserver
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 34, in <module>
from tornado.http1connection import HTTP1ServerConnection, HTTP1ConnectionParameters
File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 28, in <module>
from tornado import gen
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 97, in <module>
from singledispatch import singledispatch # backport
ImportError: No module named singledispatch
Versions Information:
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
Antwort1
Installieren von iPython Notebook mit:
sudo apt-get install ipython ipython-notebook
wird automatisch python-tornado
systemweit installiert (es ist eine obligatorische Abhängigkeit, siehehttp://packages.ubuntu.com/wily/ipython-notebook)
Sie haben das singledispatch
Importproblem, weil Sie auch manuell eine Tornado-Version in installiert haben /usr/local/lib/python2.7/dist-packages/tornado
.
Versuchen Sie, die fehlerhafte Version mit folgendem Befehl zu entfernen:
sudo rm -rf /usr/local/lib/python2.7/dist-packages/tornado