Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: ImportError: No module named glib

Thread Tools

Re: ImportError: No module named glib

Terry Reedy
Posts: n/a
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/ 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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ImportError: No module named glib Michael Joachimiak Python 2 06-20-2013 07:36 AM
Trying to install module, No module named scipy_distutils.core (but ihave scipy) process Python 1 10-17-2008 06:19 PM
glib: problem with GArray Erwan Loisant C Programming 5 10-22-2004 03:51 PM
Using JYTHON inside ANT : access os module -> "ImportError: no module named javaos" eric_bellard Python 1 10-07-2004 05:41 AM
glib/gtk and the standard Daniel C Bastos C Programming 3 07-07-2003 12:29 PM