On Windows, there is a handy thing called WinPython that contains commonly used packages from the beginning, so IPython Qt Console does not need to add any packages. It can be used. On a Mac, you have to install the package yourself, so it's quite difficult to use it. When I try to launch the IPython Qt Console, I get an error message so I can see what packages I need.
$ ipython qtconsle
...
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7, PyQt5 or PySide >= 1.0.3 is available,
and only one is imported per session.
All you need is PyQt4, PyQt5, or PySide.
First, try installing the latest PyQt5 by referring to the site below.
Set the environment variables required for PySide (Qt4) and PyQt (Qt5) It seems that PyQt5 cannot be installed with pip, so it needs to be installed with Homebrew.
Installing PyQt5 Official site
For the time being, when I check the dependent packages,
$ brew info pyqt5
...
==> Dependencies
Required: qt5 ✘, sip ✘
Install qt5 and sip, then install PyQt5.
$ brew install qt5
...
$ brew install sip
...
$ brew install pyqt5
When I try to start it again, this time I get another error.
$ ipython qtconsole
...
ImportError: No module named 'pygments'
$ pip install pygments
...
$ ipython qtconsole
...
ImportError: No module named 'zmq'
$ pip istall pyzmq
...
$ ipython qtconsole
I installed pygments and pyzmq with pip and finally started it.
I hope the Mac also has something like WinPython.
Recommended Posts