Tuesday, October 2, 2012

Installing xlrd module in Portable Python

Portable Python is a neat project to put python on a USB stick (or wherever) to not have to install it on your machine. xlrd is an excellent Python module for reading Excel files.
To make the xlrd module available in your Portable Python installation (so you can use it in a script using import xlrd) you just have to copy the source files:
1. Install Portable Python to a location of your choice. http://www.portablepython.com/
2. Download xlrd http://pypi.python.org/pypi/xlrd
3. Extract the xlrd tar.gz file
4. Copy the files found in xlrd folder (e.g.xlrd-0.8.0.tar.gz\dist\xlrd-0.8.0.tar\xlrd-0.8.0\xlrd\) to the App\lib directory of the Portable Python installation.
I suggest you create a directory for the files (e.g. Portable Python 2.7.3.1\App\Lib\xlrd).
5. Start using xlrd in scripts run using Portable Python

Source: https://groups.google.com/d/topic/portablepython/IXqu0Y1Hcug/discussion

No comments:

Post a Comment