Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8816741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:41:15+00:00 2026-06-14T04:41:15+00:00

I am using Python3 on an Ubuntu 12.04 system, and I am writing some

  • 0

I am using Python3 on an Ubuntu 12.04 system, and I am writing some small apps to teach myself about using cairo from within Python. In idle3 I find the following:

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

I have used Gtk and cairo on the same setup, and python3-gi and python3-gi-cairo are both installed, and in other respects seem to be working fine. It seems there is something else that is missing, but in spite of several web searches I have not unearthed any clues as to what is wrong here.

Can someone please point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:41:17+00:00Added an answer on June 14, 2026 at 4:41 am

    For gobject introspection, which is what python3-gi gives you, the proper incantation is this:

     >>> from gi.repository import GLib
    

    For Cairo, use cairo instead of GLib.

    In general, at least under Linux, the installed gobject introspection typelibs are installed in /usr/lib/girepository-1.0 (or similar). The name you use to import is derived straightforwardly from the typelib file name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I ran a bunch of doctests using Python 2.6 on a Ubuntu 9.10
I'm using eSpeak on Ubuntu and have a Python 2.7 script that prints and
I am using rabbitmq-server as a amqp server with python client on Ubuntu 10.04
I'm using Python 2.6.2 [GCC 4.3.3] running on Ubuntu 9.04. I need to read
I am using python Paramiko to connect using ssh to a remote ubuntu box
The same think happens for python3-scipy. I installed python-numpy/scipy, python3-numpy/scipy/ using Synaptic. But they
I'm using Python 3.2 on Ubuntu 11.10 (Linux). A piece of my new code
I'm developing an application in Python on Ubuntu and I'm running external binaries from
I'm having a module import issue. using python 2.6 on ubuntu 10.10 I have
I am running an Ubuntu 8.10, using Python 2.5 out of the box. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.