How to install ipython qtconsole?

I get this error when launching qtconsole.

I already installed:

sudo apt-get install libzmq-dev
sudo pip install pyzmq
sudo pip install pygments
sudo apt-get install libqt4-core libqt4-gui libqt4-dev

Can anyone help me figure out what's going on? I am quite new to this system and I am probably missing something really basic...thank you

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

Solution 1:

You need an additional install:

sudo pip install qtconsole

or via apt

sudo apt-get install ipython-qtconsole   # for Python2

Why?

apt-file search qtconsoleapp 

or read this.

Solution 2:

To install

pip install pyqt5 qtconsole

Run

jupyter qtconsole

Details

The command ipython qtconsole is deprecated in favour of jupyter qtconsole. For some reason, pip install qtconsole doesn't install the dependency pyqt5. I think this has to do something with the qtconsole being able to use different libraries for display, including pyside?

This was tested on Ubuntu 17.10 and Python 3.