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 🙂
4 replies on “Installing IPython Notebook on OS X”
Thanks for the post, worked for me except I had to also do a “pip install jinja2” in additional to the packages you posted.
Also needed “pip install jinja2”.
Yosemite 10.10.1
Yes, let me add that to the post.
duuuude. t/y so much for this – it totally helped getting me up and running!
in case anyone runs into the same brew – linking issue I did, here’s a good stackexchange link explaining how to get around it:
http://superuser.com/questions/435442/symlink-error-when-installing-mysql-via-homebrew?newreg=65bff2ffaf994bb4b92b01e35a67e238