« Is Monoprice A Credible Alternative to Wacom? | Main | Interlude: Easter ArtRage »

Step-by-Step: Installing Pandas on Windows 7 from PyPI with easy_install  

In preparation for some posts on analytics and visualization, I was inspired by this video of Wes McKinney introducing a PyCon audience to Pandas. I needed a low-friction tool to interactively work with tabular data and for now Pandas looks like the right choice.

I also wanted to take this opportunity to learn how to use PyPI to install packages instead of relying on binary installers. Unfortunately getting this done end-to-end isn't entirely clear so I've put up my steps below.

State of My System Before I started

  • Operating System: Windows 7 SP1
  • Python Components: Python 2.7.3 and PyWin32–217.



Step 1 Install SetupTools

Go here: http://pypi.python.org/pypi/setuptools and find the binary installer for Python 2.7

I downloaded this version: setuptools-0.6c11.win32-py2.7.exe

Yes, this is a binary installer. But once we have setuptools everything else is easy and will not require an installer.

Look in the C:\Python27\Scripts folder. You'll see that it contains an EXE called easy_install.




Step 2 Install NumPy

Start a cmd shell are this simple command

C:\>Python27\Scripts\easy_install.exe numpy

This command will start and eventually after spitting out a lot of text numpy will be installed.






Step 3 Install dateutil

This package is actually called “python-dateutil” so we need to use that name instead with easy_install

C:\>Python27\Scripts\easy_install.exe python-dateutil




Step 4 Install Pandas

You can see where this is going …

C:\>Python27\Scripts\easy_install.exe pandas




Step 5: Verify Pandas is working

We are done with the installation, let's make sure it actually works by running a quick script.

import numpy
import pandas

df = pandas.DataFrame( { "A": [11, 12, 13], "B": [34,78,109] } )





Parting Thoughts

  • easy_install versus pip: It's generally recommended that one use pip instead of easy_install. I chose not to in this example because I was having problems with pip.
  • What next: Sometime soon I'll go through some simple pandas scenarios, focusing getting good analytics out of a bug tracking database.



PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (6)

worked for me. thanks!

February 23, 2013 | Unregistered Commenterdavid p

Thanks a lot! You saved me a lot of time!
Mil Gracias!

May 12, 2013 | Unregistered CommenterGuillermo

Thanks for the guide! Helped a lot and saved me time as well.

June 1, 2013 | Unregistered CommenterAlex G

I spent the better part of the afternoon using PIP and winPython, vainly installing/uninstalling pandas multiple times trying to get this module to work properly. It wasn't until I came across your succinct explanation, that the install finally worked. I have bookmarked this page in case I need to go thru this again. Thank you very much!

October 9, 2013 | Unregistered Commenterno_spamola

Thank you. I wasted quite a bit of time trying to install pandas on windows 7 with pip and these steps finally worked for me.

January 3, 2014 | Unregistered CommenterJoel

Many thanks!

January 17, 2014 | Unregistered CommenterRobert

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>