Re: [viff-devel] Next problem
Nigel Smart writes: > Whats you complete PYTHONPATH? > > Maybe I am not picking up something It's just the one ~/opt/lib/python directory. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. pgpkasjyrqXmu.pgp Description: PGP signature ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Whats you complete PYTHONPATH? Maybe I am not picking up something Nigel Martin Geisler wrote: Nigel Smart writes: If you can give me SSH access to the machine, then I can take a closer look. I've yet to meet a machine where I couldn't get VIFF running :-) I've put my SSH public key here: Alas we cant do that due to our security policies. /me mutters something about security can be in the real-world... Well, my advice to you is to make sure you have everything laid out nicely in the PYTHONPATH. Then try importing VIFF code in an interactive Python session -- you can see which code to import from the benchmark.py script, for example. ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Nigel Smart writes: >> If you can give me SSH access to the machine, then I can take a >> closer look. I've yet to meet a machine where I couldn't get VIFF >> running :-) I've put my SSH public key here: > > Alas we cant do that due to our security policies. /me mutters something about security can be in the real-world... Well, my advice to you is to make sure you have everything laid out nicely in the PYTHONPATH. Then try importing VIFF code in an interactive Python session -- you can see which code to import from the benchmark.py script, for example. -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
If you can give me SSH access to the machine, then I can take a closer look. I've yet to meet a machine where I couldn't get VIFF running :-) I've put my SSH public key here: Alas we cant do that due to our security policies. Nigel ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Nigel Smart writes: >> >> Uh, it was supposed to be a solution for you to add :-( It was an >> explanation that you have a broken installation of Twisted. >> > > I have actually installed a whole new version of twisted, Zope, gmpy > from scratch this week. Hmm, okay. >> You can check that things are installed nicely by switching to some >> other directory and starting the interactive python interpreter: >> >> % python >> Python 2.4.3 (#1, Jun 11 2009, 14:09:58) >> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> from twisted import version >> >>> version >> Version('twisted', 2, 5, 0) >> >> Likewise for GMPY: >> >> >>> import gmpy >> >>> x = gmpy.mpz(1234567891234567891234567) >> >>> len(str(x**12345)) >> 297410 >> > > So I get > > ~% python > Python 2.4.3 (#1, Sep 3 2009, 15:37:37) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. from twisted import version version > Version('twisted', 9, 0, 0) import gmpy x = gmpy.mpz(1234567891234567891234567) len(str(x**12345)) > 297410 Okay, so some things are working... I'm afraid I don't know why you get the import errors you reported in the other mails. If you can give me SSH access to the machine, then I can take a closer look. I've yet to meet a machine where I couldn't get VIFF running :-) I've put my SSH public key here: http://cs.au.dk/~mg/tmp/mg.pub > Which implies your Twisted is ancient, as my version is 9.0.0 No, it's not as bad as it sounds -- they switched from version 2.x to version x.something where x is used in year 200x :-) -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. pgpqppgcsYeBf.pgp Description: PGP signature ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Uh, it was supposed to be a solution for you to add :-( It was an explanation that you have a broken installation of Twisted. I have actually installed a whole new version of twisted, Zope, gmpy from scratch this week. You can check that things are installed nicely by switching to some other directory and starting the interactive python interpreter: % python Python 2.4.3 (#1, Jun 11 2009, 14:09:58) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from twisted import version >>> version Version('twisted', 2, 5, 0) Likewise for GMPY: >>> import gmpy >>> x = gmpy.mpz(1234567891234567891234567) >>> len(str(x**12345)) 297410 So I get ~% python Python 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from twisted import version >>> version Version('twisted', 9, 0, 0) >>> import gmpy >>> x = gmpy.mpz(1234567891234567891234567) >>> len(str(x**12345)) 297410 >>> Which implies your Twisted is ancient, as my version is 9.0.0 Nigel -- Prof. Nigel P. Smart | Phone: +44 (0)117 954 5163 Computer Science Department, | Fax: +44 (0)117 954 5208 Woodland Road, | Email: ni...@cs.bris.ac.uk University of Bristol, BS8 1UB, UK | URL: http://www.cs.bris.ac.uk/~nigel/ ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Nigel Smart writes: >> "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/compat.py file (from which the code tries >> to import "set") has >> >> try: >> 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. > > Have now added this line, and I get the error Uh, it was supposed to be a solution for you to add :-( It was an explanation that you have a broken installation of Twisted. First of all, Python works no unlike Java with regard to it's PYTHONPATH environment variable. On my system I have installed Twisted into ~/opt/lib/python/ and have set PYTHONPATH to that same value. Inside of ~/opt/lib/python/ I have -rwxr-xr-x 1 mgeisler users 230K May 16 2007 gmpy.so drwxr-xr-x 24 mgeisler users 4.0K Sep 16 2008 twisted drwxr-xr-x 3 mgeisler users 4.0K Sep 16 2008 zope among other files. You can check that things are installed nicely by switching to some other directory and starting the interactive python interpreter: % python Python 2.4.3 (#1, Jun 11 2009, 14:09:58) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from twisted import version >>> version Version('twisted', 2, 5, 0) Likewise for GMPY: >>> import gmpy >>> x = gmpy.mpz(1234567891234567891234567) >>> len(str(x**12345)) 297410 >> 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. > > Python 2.4.3 (#1, Sep 3 2009, 15:37:37) That is fine, we have an old Redhat here with the same Python version. > We have Centos as the OS, it is a managed distributed system. > - i.e. the filestore is shared and used by 150 odd machines. > > So I cant just add packages etc. If I want something installed which my > path does not pick up I either have to > a) Search around to find it on the system > or > b) Install it myself in my own space > Clearly b usually takes less time ;-) Heh, yeah. > Also no-one in the dept seems to use python for anything, so I doubt > python related stuff is instaleld. Which means option a is unlikely to > work. It's not like it will mess things up to install Python, Twisted, and GMPY globally. The packages will just sit nicely in the corner and nobody will notice :-) -- Martin Geisler VIFF (Virtual Ideal Functionality Framework) brings easy and efficient SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/. ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
"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/compat.py file (from which the code tries to import "set") has try: 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. Have now added this line, and I get the error line 447, in ProcessProtocol implements(interfaces.IProcessProtocol) AttributeError: 'module' object has no attribute 'IProcessProtocol' 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. Python 2.4.3 (#1, Sep 3 2009, 15:37:37) We have Centos as the OS, it is a managed distributed system. - i.e. the filestore is shared and used by 150 odd machines. So I cant just add packages etc. If I want something installed which my path does not pick up I either have to a) Search around to find it on the system or b) Install it myself in my own space Clearly b usually takes less time ;-) Also no-one in the dept seems to use python for anything, so I doubt python related stuff is instaleld. Which means option a is unlikely to work. Nigel -- Prof. Nigel P. Smart | Phone: +44 (0)117 954 5163 Computer Science Department, | Fax: +44 (0)117 954 5208 Woodland Road, | Email: ni...@cs.bris.ac.uk University of Bristol, BS8 1UB, UK | URL: http://www.cs.bris.ac.uk/~nigel/ ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
Re: [viff-devel] Next problem
Nigel Smart writes: > Having installed... > > Twisted, Zope and other stuff, I get the error > > apps% python generate-config-files.py -n 3 -t 1 \ > ? localhost:9001 localhost:9002 localhost:9003 > Seeding random generator with random seed 9319 > Traceback (most recent call last): > File "generate-config-files.py", line 57, in ? > from viff.config import generate_configs > File "/home/projects/crypto/Linux/lib/python/viff/config.py", line 35, in ? > from viff.paillierutil import ViffPaillier > File "/home/projects/crypto/Linux/lib/python/viff/paillierutil.py", line > 18, in ? > from viff import paillier > > blah blah blah > > File > "/home/projects/crypto/Linux//lib64/python/twisted/internet/tcp.py", > line 74, in ? > from twisted.internet import defer, base, address, fdesc > File > "/home/projects/crypto/Linux//lib64/python/twisted/internet/base.py", > 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/compat.py file (from which the code tries to import "set") has try: 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 pgp3JqlFj9PnG.pgp Description: PGP signature ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk