Re: [viff-devel] Next problem

2009-12-04 Thread Martin Geisler
Nigel Smart ni...@compsci.bristol.ac.uk 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

2009-12-04 Thread Nigel Smart


Whats you complete PYTHONPATH?

Maybe I am not picking up something

Nigel

Martin Geisler wrote:

Nigel Smart ni...@compsci.bristol.ac.uk 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

2009-12-04 Thread Martin Geisler
Nigel Smart ni...@compsci.bristol.ac.uk 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

2009-12-03 Thread Martin Geisler
Nigel Smart ni...@compsci.bristol.ac.uk 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

2009-12-03 Thread Nigel Smart




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

2009-12-03 Thread Martin Geisler
Nigel Smart ni...@compsci.bristol.ac.uk 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

2009-12-03 Thread Nigel Smart




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

2009-12-01 Thread Nigel Smart



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