If you do not know what is IPython Notebook, please checkout the link here – http://ipython.org/notebook.html. IPython is an awesome tool that allows you to combine Python codes with rich text to create meaningful & interactive contents.
Here’s a quick demonstration:
In this post, I am going to share what I did to setup IPython Notebook on my OS X. These are the commands I used. Homebrew was used to install libraries/dependencies. Pip was used to install Python packages.
1 2 3 4 5 6 7 8 9 10 |
pip install ipython pip install tornado brew install zeromq --universal pip install pyzmq pip install pygments brew install freetype libpng pyqt pip install numpy pip install scipy pip install matplotlib pip install jinja2 |
If you use the same commands and everything works fine, you will have a working installation of IPython Notebook. You can launch the notebook web server using the following command:
1 |
ipython notebook |
This will launch the server and open your default web browser 🙂 Please note that the notebook will use your current directory as the root while displaying the files and directories. I created a dedicated directory inside my Google Drive to store my notebooks. So I created an alias for always starting the notebook server pointed to that directory. I put this in my .zshrc:
1 |
alias pynb="ipython notebook --notebook-dir='/Users/masnun/Google Drive/IPython |
Now from any place, I can issue this command to run the server:
1 |
pynb |
I am currently playing with both IPython and the IPython Notebook. Both are awesome 🙂