Nigel Smart <> writes:

> Having installed...
> Twisted, Zope and other stuff, I get the error....
> apps% python -n 3 -t 1 \
> ? localhost:9001 localhost:9002 localhost:9003
> Seeding random generator with random seed 9319
> Traceback (most recent call last):
>   File "", line 57, in ?
>     from viff.config import generate_configs
>   File "/home/projects/crypto/Linux/lib/python/viff/", line 35, in ?
>     from viff.paillierutil import ViffPaillier
>   File "/home/projects/crypto/Linux/lib/python/viff/", line 
> 18, in ?
>     from viff import paillier
>   blah blah blah
>   File
> "/home/projects/crypto/Linux//lib64/python/twisted/internet/",
> line 74, in ?
>     from twisted.internet import defer, base, address, fdesc
>   File
> "/home/projects/crypto/Linux//lib64/python/twisted/internet/",
> line 19, in ?
>     from twisted.python.compat import set
> ImportError: cannot import name set
> So clearly "set" is something I should be picking up from somewhere.
> Any idea where?

"set" is a built-in set data type in Python 2.4 and later. Twisted has a
compatibility module for older versions of Python. On my system, the
twisted/python/ file (from which the code tries to import
"set") has

      set = set
  except NameError:
      from sets import Set as set

which simply tests to see if "set" is defined, otherwise it imports it
From the sets module, which defines a Set class in old Python versions.

Which Python version are you using (python -V)? Which distribution is
this? Twisted is a standard component which is surely packaged for the
distribution -- there should be no need to installing it yourself.

Martin Geisler

Attachment: pgp3JqlFj9PnG.pgp
Description: PGP signature

viff-devel mailing list (

Reply via email to