Right place for third party modules (here: fixedpoint)

Fredrik Lundh fredrik at pythonware.com
Mon Jan 24 17:04:22 CET 2005


Sibylle Koczian wrote:

> for the first time since getting Python I can't get a third party module to work.
>
> I got fixedpoint.0.1.2.tar.gz from SourceForge for use with KinterbasDB. After unpacking I had a 
> directory called "fixedpoint" which I put under my site-packages directory. There are no 
> installation instructions and just the one module fixedpoint.py (and some documentation and 
> examples).
>
> All of this under Windows XP, with Python 2.4.
>
> Now I try to use the module, but
>
> import fixedpoint
>
> says "ImportError: No module named fixedpoint".
>
> I suppose fixedpoint is no package as described in the tutorial and so "site-packages" might not 
> be the right place for it.

site-packages sure works on my windows xp / python 2.4 configuration.

what is your sys.path set to?

    >>> import sys
    >>> sys.path
    ['', 'C:\\WINDOWS\\system32\\python24.zip', ... 'C:\\python24',
    'C:\\python24\\lib\\site-packages', ... ]

if you fire up a command window and run

    python -v -v -c "import fixedpoint"

you get a list of places where python looks for that module.  does it look
in right directory?

(this can be very verbose; you might wish to do

    python -v -v -c "import fixedpoint" 2> out
    notepad out

instead)

</F> 






More information about the Python-list mailing list