[Twisted-Python] SSH connection

Phillip J. Eby pje at telecommunity.com
Fri Feb 27 12:47:21 EST 2004

At 11:57 AM 2/27/04 -0500, Schollnick, Benjamin wrote:

> > Summary - you need to install PyCrypto, and if you do it from source
> > that means you need to do it with a compiler installed. You can use
> > mingw compiler with a bit of work (there's a howto somewhere), or you
> > can find a pre-compiled version.
>I have looked and have not yet found a pre-compiled version....
>Do you have any suggestions on where to find a pre-compiled version of
> > http://webcleaner.sourceforge.net/ has instructions on compiling
> > pycrypto on windows.
>Compiling it, at least in the complicated version of the MingW instructions,
>makes me nervous...

Here's a simpler version of the instructions:

1) Get your machine set up to build extensions using the distutils
2) Download PyCrypto and run 'setup.py install'

Step 1 is a bit more complex than step 2, but is worth the trouble because 
it means you can build any Python extension for Windows without the author 
needing to produce a binary package for you.  It amounts to:

a) Install MinGW or Cygwin.  I personally prefer Cygwin because there 
aren't so many things to install.  Just pop over to cygwin.com, click 
"install now", and be sure to include the GCC compiler when you're asked 
what packages you want.  (DON'T install the Cygwin Python, btw, unless you 
have a good reason.  You don't need it if you're building extensions for 
Windows Python.)  Anyway, when you're done with the Cygwin install, you'll 
have a nice icon that opens up a Cygwin shell, which is a convenient prompt 
to run things from.

b) ensure that the MinGW or Cygwin tools are on your system path.  E.g. add 
'C:\cygwin\bin' to your PATH.

c) Do the steps to build a 'libpython2x.a' library.  (Step 2 of "Setup for 
Windows" on the page shown.)

d) add a distutils.cfg file to your C:\Python2x\Lib\distutils directory, 
containing the lines:


this will make GCC your default compiler for any C extensions you build in 
future, so you won't need to do any of that '-c mingw32' junk.

Once you've done this, you can happily run 'python setup.py install' to 
install C extensions.

More information about the Twisted-Python mailing list