a module.pth question
Mike Driscoll
kyosohma at gmail.com
Mon Jul 14 09:12:25 EDT 2008
On Jul 14, 6:26 am, oyster <lepto.pyt... at gmail.com> wrote:
> My py24 is installed in h:\python24
> I installed pyglet(http://pyglet.org/) in
> H:\pure_pylib\Multimedia\pyglet-1.0\, if I do
> [code]>>> import sys
> >>> sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
> >>> import pyglet
>
> [/code]
> it is ok.
>
> but if I created h:\pure_pylib\pyglet.pth file, which containts
> [code]
> Multimedia\pyglet-1.0
> [/code]
>
> then
> [code]>>> import sys
> >>> sys.path.append(r'h:\pure_pylib')
> >>> import pyglet
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named pyglet
>
> [/code]
>
> what is wrong with it? and How to fix it? thanks in advance
I looked in my easy_install.pth and it looks like it should be:
.\Multimedia\pyglet-1.0
But I don't really see any reason not to do it the way you were
earlier with the full path name. Besides, you should be able to
install pyglet to your site-packages folder. Or you could use buildout
if you're just testing modules and you don't want to screw up your
namespace.
Mike
More information about the Python-list
mailing list