Having no luck installing Twisted 15.3.0

Skip Montanaro skip.montanaro at gmail.com
Fri Aug 28 13:01:40 EDT 2015


One of our users needs Twisted. I built and installed 15.3.0. When I
tried to import it, it complained:

ImportError Twisted requires zope.interface 3.6.0 or later.

So I downloaded, built and installed the latest version of
zope.interface (4.1.2). Still it complains. So I tried 3.7.0. Same
old, same old. The I installed precisely 3.6.0. Still it complains
that I need 3.6.0. Looking at the INSTALL file for Twisted, I can't
see anything else which would be absolutely required to import it.

I'm on OpenSuSE 12.2, using Python 2.7.2 provided by The Written Word.
Those are hard requirements for the foreseeable future. I have no way
to force updates of either. In particular TWW's version of Python is
binary-incompatible with OpenSuSE's, so despite the fact that there
was probably a Twisted package from them, I wouldn't be able to use
it.

Here's the full (though abbreviated) traceback:

>>> import twisted
ImportError Twisted requires zope.interface 3.6.0 or later.
[<stdin>|<module>|1]
[/opt/local/lib/python2.7/site-packages/twisted/__init__.py|<module>|53]
[/opt/local/lib/python2.7/site-packages/twisted/__init__.py|_checkRequirements|51]

I've looked at the _checkRequirements function. It apparently just
attempts to use the interface. The check fails on this bit of code:

        # Try using the API that we need, which only works right with
        # zope.interface 3.6 (or 4.0 on Python 3)
        class IDummy(interface.Interface):
            pass
        @interface.implementer(IDummy)
        class Dummy(object):
            pass

Here it is at the interpreter prompt:

>>> from zope import interface
>>> class IDummy(interface.Interface):
...   pass
...
>>> @interface.implementer(IDummy)
... class Dummy(object): pass
...
TypeError Can't use implementer with classes.  Use one of the
class-declaration functions instead.
[<stdin>|<module>|2]
[/opt/TWWfsw/python27p/lib/python2.7/site-packages/zope/interface/declarations.py|__call__|496]

I'm just throwing Twisted code at the prompt. I have no idea why it
might not be working.

Any suggestions? Should I go find a Twisted group to plead my case?

Thx,

Skip



More information about the Python-list mailing list