cd /home/philip/Packages
git clone https://github.com/ipython/ipython.git
# install this into your own virtualenv (I'm assuming at this point that you have created a virtualenv and that you have activated it).
pip install /home/philip/Packages/ipython
# do a 'which ipython' to check that it worked
# you will need development libraries for zeromq
sudo apt-get install libzmq-dev
pip install pyzmq
# check pyzmq was installed into the virtualenv
(py26)philip@desktop:~/git/project$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on desktop
Type "help", "copyright", "credits" or "license" for more information.
>>> zmq.__path__
['/home/philip/git/project/py26/lib/python2.6/site-packages/zmq']
# get the vim-ipython plugin
pip install git+https://github.com/ivanov/vim-ipython.git
# start up an IPython kernel.
ipython kernel
# and you get output like:
(py26)philip@desktop:~/git/project$ ipython kernel
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-32459.json
# startup vim and connect to the ipython kernel
gvim -c "IPython --existing kernel-32459.json"
or startup gvim and enter
:IPython --existing kernel-32459.json
In vim add this line:
3 + 4
Hit ctrl-s while still on this line and notice that a new window opens up with the result from the ipython kernelnow enter
a = 1
# from another shell
ipython qtconsole --existing kernel-32459.json
# to start up a qtconsole and connect it to the kernel
pip install pyside
ipython qtconsole --existing kernel-32459.json
do:
print a
And notice that the result of a is 1 because that is what we set a to from our vim session.