Re: ImportError: No module named glib

Discussion in 'Python' started by Terry Reedy, Mar 5, 2010.

  1. Terry Reedy

    Terry Reedy Guest

    On 3/5/2010 3:30 AM, Michael Joachimiak wrote:
    > I am too new to python.
    > If anybody has an idea what to do please help.
    > when I use
    >
    > import glib
    >
    > in my code I get this:
    >
    >>>> import glib

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


    glib is not in Python's stdlib so it must be loaded somewhere the
    interpreter can find it. Do

    >>> import sys
    >>> sys.path


    and see if it is in any of the listed directories.

    Perhaps you need to import pyglib?

    Terry Jan Reedy

    > :~$ python -V
    > Python 2.6.4
    >
    > /usr/lib/libpyglib-2.0-python2.6.so.0.0.0 exists in version 2.18.0-0ubuntu2
    >
    > :~$ pkg-config glib-2.0 --cflags --libs
    > -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0
     
    Terry Reedy, Mar 5, 2010
    #1
    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. Harry George
    Replies:
    0
    Views:
    5,711
    Harry George
    Jul 15, 2003
  2. Mikael Olofsson
    Replies:
    0
    Views:
    442
    Mikael Olofsson
    Jul 16, 2003
  3. Carsten Gehling

    pso - ImportError: No module named url

    Carsten Gehling, Jul 16, 2003, in forum: Python
    Replies:
    0
    Views:
    387
    Carsten Gehling
    Jul 16, 2003
  4. eric_bellard
    Replies:
    1
    Views:
    5,112
    CarlosRivera
    Oct 7, 2004
  5. Michael Joachimiak

    ImportError: No module named glib

    Michael Joachimiak, Mar 5, 2010, in forum: Python
    Replies:
    2
    Views:
    2,853
Loading...

Share This Page