How to set up the IPython notebook on Windows

IPy_headerThis article details the steps required to set up the IPython notebook on Windows 7, 8 or 10.
This one extends the console-based approach to interactive computing.
It provides everything needed for developing, documenting and running code.

Download and install python from this website.

Windows x86 MSI Installer (2.7.8)

Download and install easy_install

setuptools-0.6c11.win32-py2.7.exe

Open a Command Prompt window with administrative privileges.

Go to the Start button and type in the search box « cmd » and use the right-click to choose the Run as administrator option.  (Or Start -> All programs -> Accessories ->  Command Prompt)

Type these commands :

cd C:\Python27\Scripts
.\easy_install.exe ipython[zmq]
.\easy_install.exe tornado

Don’t close the Command Prompt window
Go on this website and install the following python libraries (it’s pretty fast…):

  • numpy‑MKL‑1.8.2.win32‑py2.7.exe
  • Jinja2‑2.7.3.win32‑py2.7.exe
  • MarkupSafe‑0.23.win32‑py2.7.exe
  • Pygments‑2.0.1.win32‑py2.7.exe


The Command Prompt Windows should still be opened, type the following command :

.\easy_install.exe pan­das

Now go on this web page and install the last version of matplotlib for python 2.7 32 bits.
(Currently : matplotlib-1.4.2.win32-py2.7.exe)

Open the Control Panel, System and Security, System, Advanced system settings (in the left pane).
In the System Properties window, select the « Advanced » tab and click on « Environment Variables »

In the System Variables, find the Path variable et click on Edit.

Do not delete the contents of the value of the variable that contains several elements separated by a semicolon ‘;’.
Insert at the end two new values :

C:\Python27;C:\Python27\Scripts


PythonPython2

Close the Command Prompt windows if it’s not already done and open a new one without administrative privileges and type the following :
(Creating a workspace and starting the IPython Notebook)

cd Documents
mkdir IPython         
cd IPython 
ipython notebook --pylab inline

Your browser should open and display this webpage:

Python3

You can start coding!
See you soon on DataSciencePost !