[SciPy-User] Installed scikits.learn, .pth file doesn't add egg to path

Alexander Borghgraef alexander.borghgraef.rma@gmail....
Wed Dec 8 08:40:19 CST 2010

Hi all,

 I've installed the latest scikits.learn package via easy_install locally
into my home directory. The local libs are located in
$HOME/local/libs/python2.6/site-packages, which I added to my PYTHONPATH
variable. Now, easy_install puts the library into an egg within the
site-packages, but adds an easy_install.pth file which should make it
visible for import, so I shouldn't put every egg into my PYTHONPATH
manually. However, "import scikits" doesn't work. It does work when I add
the egg directory ( scikits.learn-0.5-py2.6-linux-x86_64.egg ) to the
PYTHONPATH. I'm not familiar with .pth files, though they seem simple and at
a first glance, it should work. The file contains the following code:

>> import sys; sys.__plen = len(sys.path)
> ./site-packages/scikits.learn-0.5-py2.6-linux-x86_64.egg
> import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
> p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
> p+len(new)

I also fiddled a bit with it, removing the leading ./, or adding the full
path of the egg, but no results. Any suggestions?

Alex Borghgraef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20101208/2719fe45/attachment.html 

More information about the SciPy-User mailing list