启动时出现此错误qtconsole
。
我已经安装了:
sudo apt-get install libzmq-dev
sudo pip install pyzmq
sudo pip install pygments
sudo apt-get install libqt4-core libqt4-gui libqt4-dev
有人能帮我弄清楚发生了什么吗?我对这个系统还很陌生,可能错过了一些非常基本的东西……谢谢
david@Hyperion:~$ ipython qtconsole
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 9, in <module>
load_entry_point('ipython==4.1.0.dev0', 'console_scripts', 'ipython')()
File "/usr/local/lib/python2.7/dist-packages/ipython-4.1.0.dev0-py2.7.egg/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.1.0.dev0-py2.7.egg/IPython/terminal/ipapp.py", line 305, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.1.0.dev0-py2.7.egg/IPython/core/application.py", line 386, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.1.0.dev0-py2.7.egg/IPython/terminal/ipapp.py", line 300, 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/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 487, 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/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 418, in initialize_subcommand
subapp = import_item(subapp)
File "/usr/local/lib/python2.7/dist-packages/ipython_genutils/importstring.py", line 31, in import_item
module = __import__(package, fromlist=[obj])
ImportError: No module named qtconsole.qtconsoleapp
答案1
您需要额外安装:
sudo pip install qtconsole
或通过 apt
sudo apt-get install ipython-qtconsole # for Python2
为什么?
apt-file search qtconsoleapp
或阅读这。
答案2
安装
pip install pyqt5 qtconsole
跑步
jupyter qtconsole
细节
该命令ipython qtconsole
已被弃用,取而代之的是jupyter qtconsole
。出于某种原因,pip install qtconsole
不会安装依赖项pyqt5
。我认为这与能够qtconsole
使用不同的库进行显示有关,包括pyside
?
这是在 Ubuntu 17.10 和 Python 3 上测试的。