나는 다음을 사용하여 IPython을 설치했습니다.
sudo apt-get install ipython ipython-notebook
하지만 시작하려고 하면 일부 구성 요소를 찾을 수 없다고 불평합니다.
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
버전 정보:
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
답변1
다음을 사용하여 ipython 노트북 설치:
sudo apt-get install ipython ipython-notebook
python-tornado
시스템 전체에 자동으로 설치됩니다 (필수 종속성입니다. 참조).http://packages.ubuntu.com/wily/ipython-notebook)
singledispatch
.NET에서 토네이도 버전을 수동으로 설치했기 때문에 가져오기 문제가 있습니다 /usr/local/lib/python2.7/dist-packages/tornado
.
다음을 사용하여 범인 버전을 제거해 보십시오.
sudo rm -rf /usr/local/lib/python2.7/dist-packages/tornado