a module.pth question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • oyster

    a module.pth question

    My py24 is installed in h:\python24
    I installed pyglet(http://pyglet.org/) in
    H:\pure_pylib\M ultimedia\pygle t-1.0\, if I do
    Code:
    [QUOTE][QUOTE][QUOTE]
    >>import sys
    >>sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
    >>import pyglet[/QUOTE][/QUOTE][/QUOTE]
    it is ok.

    but if I created h:\pure_pylib\p yglet.pth file, which containts
    Code:
    Multimedia\pyglet-1.0
    then
    Code:
    [QUOTE][QUOTE][QUOTE]
    >>import sys
    >>sys.path.append(r'h:\pure_pylib')
    >>import pyglet[/QUOTE][/QUOTE][/QUOTE]
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named pyglet[QUOTE][QUOTE][QUOTE]
    >>>[/QUOTE][/QUOTE][/QUOTE]
    what is wrong with it? and How to fix it? thanks in advance
  • Mike Driscoll

    #2
    Re: a module.pth question

    On Jul 14, 6:26 am, oyster <lepto.pyt...@g mail.comwrote:
    Code:
    >>import sys[QUOTE][QUOTE]
    >sys.path.append(r'H:\pure_pylib\Multimedia\pyglet-1.0')
    >import pyglet
    My py24 is installed in h:\python24 I installed pyglet(http://pyglet.org/) in H:\pure_pylib\M ultimedia\pygle t-1.0\, if I do
    [/QUOTE] >
    it is ok.
    >
    but if I created h:\pure_pylib\p yglet.pth file, which containts
    Code:
    Multimedia\pyglet-1.0
    >
    then
    Code:
    >>import sys[QUOTE][QUOTE]
    >sys.path.append(r'h:\pure_pylib')
    >import pyglet[/QUOTE][/QUOTE]
    >
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    ImportError: No module named pyglet
    >
    >
    what is wrong with it? and How to fix it? thanks in advance[/QUOTE]

    I looked in my easy_install.pt h and it looks like it should be:

    .\Multimedia\py glet-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

    Comment

    Working...