« matplotlibをつかってxkcd風のプロット | トップページ | IPython Notebook使ってみた。 »

2013年1月29日 (火)

How to use IPython notebook on Portable Python (Windows XP/7/8)

Have you tried IPython Notebook yet? There are lots of buzz around.. Those of you who do not know or need some update should check the talk by Brian Granger from 14:35.

Also, here is the official documentation: An HTML Notebook IPython 


It looks really cool! Ok, let’s start installing.

Usually the best way to install python scientific packages in Windows is to use Python(x,y) but IPython Notebook requires newer IPython than what Python(x,y) currently packages (IPython They are working on it to update. Meanwhile, we can test IPython Notebook using Portable Python.

Why Portable Python? A nice thing about Portable Python is that it will be completely separated from the system python or even older versions of Portable Python, because it will just create a new folder for it and its designed to be portable! IMO, in Windows, Portable Python is much better than virtualenv.

So, first of all, we need the Portable Python or higher which installs PyQt4 along with other libraries (QtConsole and Notebook need PyQt4).

Installing new packages in Portable Python is easy: just use easy_install provided in Portable Python. 

  1. go to app/scripts folder and locate “easy_install.exe” there. 
  2. now open a command prompt (cmd) and cd to this folder.
  3. then, easy_install [package_name]

So, let’s install the latest release version of ipython by:

easy_install ipython

This grabbed ipython-0.13.1-py2.7 for me.

Now still from app/scripts, let's test ipython.exe


This should work, but will complain about pyreadline and ctypes (this can be ignored, because we are using Python 2.7). So, let’s get pyreadline:

easy_install pyreadline

After you made sure that ipython is working, type in:

easy_install ipython[zmq,qtconsole,notebook,test]

This should grab all the dependencies for IPython Notebook.

Then still from app/scripts folder, run ipython with notebook option.

ipython notebook



In my environment, IE9 is launched. I thought IE9 does not support web-socket. 

Reading this pointed me to use "--no-browser" option. Now, I can use my favorite browser Firefox (any modern browsers that support web-socket, like latest chrome and Firefox, will do) and go to the server address (e.g.  Your port number will be found on the console output after lunching the server. 
ipython.exe notebook --no-browser
When you are done, [Ctrl+C] on the command Prompt will shutdown the server.

« matplotlibをつかってxkcd風のプロット | トップページ | IPython Notebook使ってみた。 »









この記事へのトラックバック一覧です: How to use IPython notebook on Portable Python (Windows XP/7/8):

« matplotlibをつかってxkcd風のプロット | トップページ | IPython Notebook使ってみた。 »



        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31