[Wolves] One for the python mingers?
David Goodwin
dg at clocksoft.com
Thu Dec 1 11:27:24 GMT 2005
Peter Cannon wrote:
> Hi All
>
> I need to get this package installed having read the README file 14 times and
> two nose bleeds later where the b%$@ hell do I put it?
>
> --<snip from README>--
> Create a .pth file, say reportlab.pth in your Python
> home directory. It should have one line:
> d:/ReportLab.
>
> Alternatively unpack the archive into a directory which is already on your
> python path.
> --<end>--
>
> Here is the whereis output of my system, or am I barking up the wrong tree.
>
> [root at lightstar ~]# whereis python
> python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/include/python2.4 /usr/share/man/man1/python.1.gz
>
> I need to get this installed so that I can install Kumla I've done all the
> other packages.
>
Hi Peter,
On a Linux system locally installed python modules will normally live in
a "site-packages" directory. This is normally somewhere like
/usr/lib/python2.4/site-packages or
/usr/local/lib/python2.4/site-packages, depending on your $distro.
The .pth file is used by Python to flatten the import list, so for
instance rather than saying (in python-ish) :
import foo.bar
Where foo is the directory you created in site-packages. With the
$whatever.pth you can do :
import bar
In teh above instance, the .pth file would contain just "foo"
Hope that helps (enough),
David.
--
David Goodwin
w: http://www.clocksoft.co.uk
e: david.goodwin at clocksoft.com
t: 0121 313 3850
More information about the Wolves
mailing list