newbie, help with pythonpath

Discussion in 'Python' started by Eduardo Suarez, Mar 3, 2005.

  1. Hi all,

    In order not to make a mess my system, i have installed a packaged
    called pygtkglext in /usr/local/pygtkglext instead of /usr/local (using
    the --prefix in ./configure).

    Hence, i have the directories
    /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gtkgl
    /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gdkgl
    with the python packages i have compiled.

    I'm trying to set the python path variable so i can use them, but i
    haven't got it. Any hint?

    I have also installed the gtk package in:
    /usr/lib/python2.3/site-packages/gtk-2.0/gtk

    Is there a way to make it work?

    Thanks a lot,
    -Eduardo
    Eduardo Suarez, Mar 3, 2005
    #1
    1. Advertising

  2. Eduardo Suarez wrote:
    > I'm trying to set the python path variable so i can use them, but i
    > haven't got it. Any hint?


    sys.path.append('/usr/blah/blah/blah/directory')
    Chmouel Boudjnah, Mar 3, 2005
    #2
    1. Advertising

  3. Eduardo Suarez

    Peter Hansen Guest

    Eduardo Suarez wrote:
    > In order not to make a mess my system, i have installed a packaged
    > called pygtkglext in /usr/local/pygtkglext instead of /usr/local (using
    > the --prefix in ./configure).
    >
    > Hence, i have the directories
    > /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gtkgl
    > /usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk-2.0/gtk/gdkgl
    > with the python packages i have compiled.
    >
    > I'm trying to set the python path variable so i can use them, but i
    > haven't got it. Any hint?
    >
    > I have also installed the gtk package in:
    > /usr/lib/python2.3/site-packages/gtk-2.0/gtk
    >
    > Is there a way to make it work?


    Yes, with the easiest way of explaining it to you being this:
    "please read the comments at the top of the site.py file in
    the standard library and use the techniques it suggests".

    I think the online documentation for the site module also
    covers this stuff, but I don't recall verifying that yet...

    -Peter
    Peter Hansen, Mar 3, 2005
    #3
  4. What do i need to add to the path? I have already tried the same with
    the PYTHONPATH variable.

    Thanks in advance,
    -Eduardo

    [otto:eduardo/ 501]$ python
    Python 2.3.5 (#2, Feb 9 2005, 00:38:15)
    [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1/lib')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0/gtk')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0/gtk/gtkgl')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>


    Chmouel Boudjnah wrote:
    > Eduardo Suarez wrote:
    >
    >> I'm trying to set the python path variable so i can use them, but i
    >> haven't got it. Any hint?

    >
    >
    > sys.path.append('/usr/blah/blah/blah/directory')
    >
    Eduardo Suarez, Mar 4, 2005
    #4
  5. What do i need to add to the path? I have already tried the same with
    the PYTHONPATH variable.

    Thanks in advance,
    -Eduardo

    [otto:eduardo/ 501]$ python
    Python 2.3.5 (#2, Feb 9 2005, 00:38:15)
    [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1/lib')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>> sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages')
    >>> import gtk.gtkgl

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0/gtk')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>

    sys.path.append('/usr/local/pygtkglext-1.0.1/lib/python2.3/site-packages/gtk
    -2.0/gtk/gtkgl')
    >>> import gtk.gtkgl Traceback (most recent call last):

    File "<stdin>", line 1, in ?
    ImportError: No module named gtkgl
    >>>


    Chmouel Boudjnah wrote:
    > Eduardo Suarez wrote:
    >
    >> I'm trying to set the python path variable so i can use them, but i
    >> haven't got it. Any hint?

    >
    >
    > sys.path.append('/usr/blah/blah/blah/directory')
    >
    Eduardo Suarez, Mar 4, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Kirsch

    jython and PYTHONPATH

    Harald Kirsch, Jun 28, 2003, in forum: Python
    Replies:
    1
    Views:
    1,206
    Ype Kingma
    Jun 30, 2003
  2. vincent delft

    CGIHTTPserver looze PYTHONPATH

    vincent delft, Jul 13, 2003, in forum: Python
    Replies:
    1
    Views:
    438
    vincent_delft
    Jul 13, 2003
  3. klappnase

    Re: Python..Tkinter..PYTHONPATH..

    klappnase, Jul 30, 2003, in forum: Python
    Replies:
    0
    Views:
    394
    klappnase
    Jul 30, 2003
  4. Observer

    Help with pythonpath

    Observer, Jun 1, 2005, in forum: Python
    Replies:
    2
    Views:
    409
  5. Tim Hanson

    newbie question about PYTHONPATH

    Tim Hanson, Feb 15, 2011, in forum: Python
    Replies:
    3
    Views:
    537
    Westley Martínez
    Feb 19, 2011
Loading...

Share This Page