how to find site-packages path
vincent at visualtrans.de
Mon Jan 17 18:38:59 CET 2005
Philippe C. Martin wrote:
> I am using my own install script for my software and am looking for a
> flawless way to figure out where python, and more specifically
> site-packages is installed.
You can take a look at how this is done in Lib/site.py.
Look for the bit of code that starts with
prefixes = [sys.prefix]
sitedir = None # make sure sitedir is initialized because of later 'del'
> Any clue ?
More information about the Python-list