Right place for third party modules (here: fixedpoint)
steve at holdenweb.com
Mon Jan 24 10:52:04 EST 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. But where does it
> belong? I think it should go somewhere in the Python directory tree, not
> among my own scripts.
> Thank you,
Instead, just move the "fixedpoint.py" file to your site-packages
directory. You can then delete the empty fixedpoint directory, as it
won't do anything except get in the way.
Packages are implemented as directories, but modules are single Python
files. "Site-packages" is a perfectly acceptable place to put "site
modules" as well ;-)
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
More information about the Python-list