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

  • Home
  • SEARCH
  • 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 8746371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:10:59+00:00 2026-06-13T12:10:59+00:00

When I try to import Qt4 modules from within a virtual environment, I get

  • 0

When I try to import Qt4 modules from within a virtual environment, I get the following error:

$ python -c 'from PyQt4 import QtCore, QtGui'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named PyQt4

The packages python-qt4, python-qt4-dev, and pyqt4-dev-tools are all installed on the system, and when I run the same command from outside of the virtual environment, I don’t get any errors. Any ideas how to fix this? I’m using Ubuntu 10.04, python 2.6, and virtualenv 1.8.2

  • 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-13T12:11:00+00:00Added an answer on June 13, 2026 at 12:11 pm

    The whole point of a virtualenv is that it is isolated from the rest of the system. Contemporary versions of virtualenv default to a configuration that excludes system Python packages. If you want to check whether your virtualenv was created with no site packages, follow the recommendations of the accepted answer in this question.

    You need to install PyQt4 in the virtualenv. That process can trip up a first timer – so read through the answers to this question first.

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

Sidebar

Related Questions

A lot of our modules start with: try: import json except ImportError: from django.utils
When I try import locale locale.setlocale(locale.LC_COLLATE, 'ja-JP') I get the error message locale.Error: unsupported
When I try to import the scipy module (version 0.11.0b1) in the Python interpreter
I just follow this DIHQuickStart , try to import data to solr from mysql.
I have a problem using the SSIS. I try to import data from database
I am currently using PIL. from PIL import Image try: im = Image.open(filename) #
What does this code mean? try: import thread except ImportError: del _sys.modules[__name__]#why raise But
Take Django for instance, in manage.py : try: import settings except ImportError: sys.stderr.write(Error: Can't
I've created a Python package that contains both pure modules and scripts, all within
I'm following this tutorial on web2py where you get to make a testdriven environment.

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.