ipython是一个很不错的调试工具,多谢园友zhuangzhuang1988提示。
在Ubuntu下,安装ipython很简单:
$sudo apt-get install ipython
Ubuntu默认的python为2,所以如果要使用ipython3需要运行
$sudo apt-get install ipython3
如果想要使用ipython-qt,对于python2而言可以直接在软件中心中安装(当然,ipython也可以),对于ipyhon3-qt,则要麻烦一些。
$sudo apt-get source python-slip
$sudo apt-get python-qt4
然后对于新下载的源码,都进入源码目录后执行:
$sudo python3 configure.py
$sudo make
$sudo make install
参考:
http://zoomquiet.org/res/scrapbook/ZqFLOSS/data/20110408194625/
PyQt is not yet packaged for Python 3, so we have to recompile from source. You'll need to install the packages qt4-dev-tools qt4-qmake python3-dev. PyQt must match the system version of Qt, so don't download the newest version from Riverbank. Use apt-get source to get:
- First, python-sip (needed to compile PyQt)
- python-qt4
For each, do:
python3 configure.py make sudo make install
You should now be able to run the Qt console frontend (ipython3-qtconsole).
我安装后没有成功,太菜,于是在这里找到了下载:
http://packages.debian.org/wheezy/all/ipython3-qtconsole/download
下载后安装,提示依赖关系不足 :-(
最后,在/etc/apt/sources.list 文件中像下面这样添加一行(不知道不填加能否安装):
deb http://ftp.de.debian.org/debian wheezy main
然后在新立得中看到了ipython3 qtconsole,标记安装,然后在终端运行:
ipyhon3 qtconsole
OK !