Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This borders on stackoverflow/superuser, but I guess it's a simple installation problem.

I've installed python-twisted on my ubuntu 10.04 server, but it can't be found.

This is what I get when I try to import something:

>>> from twisted.internet import reactor
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
    from twisted.internet import reactor
ImportError: No module named internet

I've installed the package through apt-get. That way the module is installed in this folder: /usr/lib/python2.6/dist-packages/twisted with an file.

When I try to use python install (on the download from the site) it installs it to /usr/local/lib/python2.6/dist-packages/twisted, but it also does not find it there.

Does anyone know where it went wrong? Google isn't spilling anything.

share|improve this question
Does just import twisted work? – Josh Hunt Jul 10 '10 at 1:14
How did you install python-twisted? apt-get, easy_install, install? – fideli Jul 10 '10 at 1:29
I installed it through apt-get, yeah. Didn't really see the point in doing it through And since nobody else has ever reported this problem with twisted before I thought I must be doing something wrong. Just importing twisted also does not work. It gives the same error "ImportError: No module named internet" – skerit Jul 10 '10 at 11:05
The package from apt-get installs twisted into the /usr/lib/python2.6/dist-packages/twisted directory, with a file in it. So that should work! To test it out, I removed it and installed it through python installbut it installed it into /usr/local/lib/python2.6/dist-packages/twisted – skerit Jul 10 '10 at 11:49
up vote 2 down vote accepted

You seem to have a file that shadows the correct imports. Rename it. You can use absolute imports (from __future__ import absolute_imports), if you want your own module to be available as myapp.twisted.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.