installing any python module

Gabriel Genellina gagsl-py2 at
Fri Jul 11 10:18:50 CEST 2008

En Thu, 10 Jul 2008 14:02:29 -0300, Bhagwat Kolde <bbkolde at>  

> What is the correct process of installing any external python module?
> Once we downloaded any python module,
> Q1) Where this module should be placed in python installation file
> structure?

If it is a single Python module, you can put it anywhere in the Python  
path. A good place may be the site-packages subdirectory. Execute this  
line to see the list of directories that are currently searched for  

python -c "import sys; print '\n'.join(sys.path)"

More complex packages (containing many modules and its own internal  
hierarchy) usually provide a script

> Q2) How to execute file?

Like any other script. For many Python packages, you only have to execute  

cd path/to/the/downloaded/and/uncompressed/package
python install

Please read the package documentation for any specific instructions. There  
is a generic guide aimed at site administrators: "Installing Python  
Modules" <>

Gabriel Genellina

More information about the Python-list mailing list