4

When I deploy my google app engine project, I get the following warning:

WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
http://pypi.python.org/pypi/ssl.

I downloaded the package, but when I try

python setup.py build

I get the following error output:

looking for /usr/include/openssl/ssl.h
looking for /usr/local/ssl/include/openssl/ssl.h
looking for /usr/contrib/ssl/include/openssl/ssl.h
Traceback (most recent call last):
  File "setup.py", line 167, in <module>
    ssl_incs, ssl_libs, libs = find_ssl()
  File "setup.py", line 142, in find_ssl
    raise Exception("No SSL support found")
Exception: No SSL support found

What do I need to do to install it, is it a path issue or something?

Curyous
  • 8,716
  • 15
  • 58
  • 83
  • As the warning states, you don't _have_ to install the SSL module. Do you have reason to suspect anyone wants to MitM your connections to the App Engine server? – Nick Johnson Jun 21 '10 at 08:43

3 Answers3

5

Fixed by installing pycrypto first, following the instructions from here and using the insight from an answer to this question.

The full command line I used for the eventual build was:

CC='/usr/bin/gcc-4.0' python2.5 setup.py build
Community
  • 1
  • 1
Curyous
  • 8,716
  • 15
  • 58
  • 83
  • Thank you. Your command line just helped me compile ssl for python using the google instructions. I also had to reinstall XCode, I managed to drop SDK for OS 10.4 since I did not realize I would ever need it again. Here's to hoping. – TheJacobTaylor Jan 04 '11 at 23:11
2

The stock Apple python on both 10.5 and 10.6 includes the ssl module (unclear about earlier versions):

Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.__file__
'/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.pyc'

(from 10.5.8)

You could actually get that error message from appengine_rpc.py even if you have ssl - you need to make sure that your GAE download has:

/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cacerts/cacerts.txt

If you have both of those things, try doing:

import google.appengine.tools.https_wrapper

Which should work with the stock Apple python, but if it doesn't the error messages might be more informative. If you have multiple pythons installed such that one is screwing up GAE, make sure to use the Python Path preference in GAE to point to the Apple Python.

Nick Bastin
  • 30,415
  • 7
  • 59
  • 78
0

You may need to manually install openssl, although the headers should be placed in /usr/include by the default Xcode installation. (If you haven't installed Xcode, it's unlikely you have gcc on your machine, and the build would fail later in the process anyway.)

Wooble
  • 87,717
  • 12
  • 108
  • 131