If an install worked the first time I would be surprised

Recently I’ve expanded my horizons and installed openpyxl to enable direct manipulation of Excel files in Python. And yes, it was an absolute nightmare to install because easy_install wouldn’t work, manual install wouldn’t work…so after much back and forth (and probably while IT wasn’t looking), I got it working.

After I downloaded easy_install and unzipped the package, I extracted it and added the python scripts folder to my PATH. I ran ez_setup.py and left it. I downloaded the manual install for openpyxl and unzipped it in an arbitrary folder.

I then ran an elevated command prompt and changed to the openpyxl directory, where I then typed the command C:Python27ArcGIS10.1python setup.py install. After randomly not working a couple of times (and after I rebooted my machine), things started scrolling by so it seemed fine. Of course, when I tried to quickly import openpyxl in IDLE, it could not resolve it. After a couple of days, nothing was happening, so I tried easy_install openpyxl. To my surprise, it tried to download an egg but said I already have the latest version installed. So again, I tried to import openpyxl in IDLE and Eclipse, but no such luck.

After much googling, I then came across an answer in the Google group about adding the site-packages folder to the PYTHONPATH. Et voila, openpyxl baby! I’ll be posting a script I wrote yesterday using it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s