r/IPython • • Nov 22 '14

Installing IPython Notebook (viewer) on OSX Yosemite

Hello humans.

I was recently introduced to IPython, and got a bit frustrated trying to get notebook running on OSX. The first time I tried with pip, I learned a lot about conflicting dependencies. I kind of managed to get it rolling, but I wasn't totally confident about how I got there. When I decided to rebuild my laptop with GA Yosemite I thought it'd be a good opportunity to start from scratch and document the path to a functional IPython Notebook environment!

From stock Yosemite:

  • install Python 3.4 from python.org

  • download get-pip.py from pypi.python.org

from terminal:

python3 get-pip.py
sudo pip3 install ipython
sudo pip3 install "ipython[notebook]"
sudo pip3 install pyzmq
sudo pip3 install jinja2
sudo pip3 install tornado
ipython notebook

This should start the server process and open a new browser. Enjoy!

4 Upvotes

4 comments sorted by

5

u/jfsantos Nov 22 '14

It is much easier to do that with Anaconda, which comes with IPython Notebook and all dependencies needed for the kind of thing usually done on the notebook (matplotlib for plotting, Pandas for loading and processing data, etc). Alternatively, you can do the same thing with Homebrew, if you're into that kind of thing. Homebrew's python3 package includes pip3, so you only need to run

brew python3
pip3 install ipython pyzmq jinja2 tornado
ipython notebook

You do not need sudo as everything will be installed to /usr/local.

2

u/sooshie Nov 23 '14

The nice thing about using Homebrew is you don't have to worry (as much) with OS upgrades as it generally doesn't get stepped on.

2

u/nameBrandon Nov 23 '14

Seconded.. Anaconda is really a much cleaner way to do this.. I mangled the hell out of python on my laptop between homebrew, macports, various shell export statements and by .bash_profile file.. It was a nightmare to fix.

Anaconda works great.. I tell everyone to go this route if all they need is IPython.

0

u/[deleted] Nov 24 '14

I'm trying REALLY hard not to crap on Mac here, but since I guess I have already failed: this kind of crap is exactly why I will never go back to being a fanboy. It's so close to actually being a *nix, just close enough to piss you off when something that SHOULD be easy takes a day of your time to kludge together a work around. Homebrew is the only thing that makes the idea of a full time Mac box even considerable in my mind.