Search code examples
pythontkintertwistedtwisted.internet

ImportError: cannot import name 'tksupport'


I guess this is a dumb question, but I don't know how to solve my problem. I googled about it and also searched SO with no results.

I'm learning tkinter and twisted, and was going through a basic example, but cannot import tksupport.

I'm running ubuntu mate 16.04 (32bits), and python3.5.

I installed twisted using apt-get install python3-twisted, then when it didn't work I installed once more using pip3 install twisted.

Both this commands seemed to work just fine, and one of my imports (reactor) is working. This is my import

from twisted.internet import tksupport, reactor

Can anyone tell me what am I doing wrong?

Thanks


Solution

  • Not all modules in twisted have been ported to Python 3. tksupport has not been ported.

    Only some parts of Twisted have been ported, and therefore only a subset of modules are installed under Python 3. You can see the full list of ported modules in twisted.python.dist3.

    Twisted Python3 documentation

    List of twisted modules currently in Python3