January 19, 2012

Installing python modules with easy_install

I wanted to add modules Jinja2 and markupsafe to python. All I needed to do was run the easy_install module with the a parameter. easy_install will search for the module, download and install it.  First you need to download setuptools from this location. I downloaded the version for windows and ran the setup. It detects the Python directory on your machine and installs easy_install.exe under the Scripts subdirectory.

Here's an example usage:


C:\dev\Python27_32bit\Scripts>easy_install markupsafe
Searching for markupsafe
Reading http://pypi.python.org/simple/markupsafe/
Reading http://dev.pocoo.org/
Best match: MarkupSafe 0.15
Downloading http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.15.tar.gz#md5=4e7c4d965fe5e033fa2d7bb7746bb186
Processing MarkupSafe-0.15.tar.gz
Running MarkupSafe-0.15\setup.py -q bdist_egg --dist-dir c:\users\sgeorge\appdata\local\temp\easy_install-vfp6j3\MarkupSafe-0.15\egg-dist-tmp-eazrvh_speedups.c
   Creating library build\temp.win32-2.7\Release\markupsafe\_speedups.lib and object build\temp.win32-2.7\Release\markupsafe\_speedups.exp
Adding markupsafe 0.15 to easy-install.pth file

Installed c:\dev\python27_32bit\lib\site-packages\markupsafe-0.15-py2.7-win32.egg
Processing dependencies for markupsafe
Finished processing dependencies for markupsafe

No comments: