2

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?

Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117

3 Answers3

4

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
  • 34,800
  • 15
  • 46
  • 64
-1

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
  • 31,152
  • 11
  • 87
  • 129
  • 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 Jun 16 '09 at 08:33
-4

Use pexpect with the openssl binary.

Richard Simões
  • 12,401
  • 6
  • 41
  • 50
  • except that subprocess is fine and part of the std library (note: i didn't downvote you) – Matt Joiner Jun 29 '10 at 10:54
  • 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. – Richard Simões Jun 29 '10 at 14:45
  • But it doesn't answer the question. If you have software that looks for ssl or _ssl, installing pexpect doesn't help you. – Lennart Regebro Nov 29 '11 at 14:17