views:

651

answers:

3

I tried using the ssl module in Python 2.6 but I was told that it wasn't available. After installing OpenSSL, I recompiled 2.6 but the problem persists.

Any suggestions?

+1  A: 

Did you install the OpenSSL development libraries? I had to install openssl-devel on CentOS, for example. On Ubuntu, sudo apt-get build-dep python2.5 did the trick (even for Python 2.6).

Jacob Gabrielson
A: 

Use pexpect with the openssl binary.

BipedalShark
Silly downvoters, this answer is fabulous.
BipedalShark
except that subprocess is fine and part of the std library (note: i didn't downvote you)
Matt Joiner
pexpect has the added benefit of allowing one to wait for certain actions by openssl to finish before sending more data to STDOUT. This nicety would have to be coded manually otherwise.
BipedalShark
A: 

Use the binaries provided by python.org or by your OS distributor. It's a lot easier than building it yourself, and all the features are usually compiled in.

If you really need to build it yourself, you'll need to provide more information here about what build options you provided, what your environment is like, and perhaps provide some logs.

Glyph
I installed it via a tar file under Ubuntu Linux 8.10. Just decompressed it, ran ./configure;make;sudo make install and was done. Its just that I can't get ssl to import.
Evan Fosmark