I figured I’d document this since I have to do it again. If you are using Google App Engine and you get the following:
2011-01-26 14:17:45,892 WARNING appengine_rpc.py:405 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 .
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl .
You download the file from the page suggested in the error. Then do this:
vanhoudn@gauze:~/Downloads$ tar xzf ssl-1.15.tar.gz
vanhoudn@gauze:~/Downloads$ cd ssl-1.15/
vanhoudn@gauze:~/Downloads/ssl-1.15$ python2.5 setup.py build
If it worked, great! Just do sudo python2.5 setup.py install and you are done. If not, you may have run into this error:
vanhoudn@gauze:~/Downloads/ssl-1.15$ python2.5 setup.py
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
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
You can fix that by installing the relevant parts of the SSL source code with sudo apt-get install libssl-dev. Trying again you might get:
vanhoudn@gauze:~/Downloads/ssl-1.15$ python2.5 setup.py build
looking for /usr/include/openssl/ssl.h
looking for /usr/include/krb5.h
looking for /usr/kerberos/include/krb5.h
running build
running build_py
running build_ext
building 'ssl._ssl2' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./ssl/2.5.1 -I/usr/include/python2.5 -c ssl/_ssl2.c -o build/temp.linux-i686-2.5/ssl/_ssl2.o
ssl/_ssl2.c:17:20: error: Python.h: No such file or directory
In file included from ssl/_ssl2.c:76:
./ssl/2.5.1/socketmodule.h:112: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
.... lots of other errors ....
error: command 'gcc' failed with exit status 1
You can fix that by installing the headers for python2.5. Apparently, when I initially installed deadsnakes I forgot to install the headers. Easy enough with sudo apt-get install python2.5-dev. But not I get a bluetooth related error:
In file included from ssl/_ssl2.c:76:
./ssl/2.5.1/socketmodule.h:45:33: error: bluetooth/bluetooth.h: No such file or directory
./ssl/2.5.1/socketmodule.h:46:30: error: bluetooth/rfcomm.h: No such file or directory
./ssl/2.5.1/socketmodule.h:47:29: error: bluetooth/l2cap.h: No such file or directory
./ssl/2.5.1/socketmodule.h:48:27: error: bluetooth/sco.h: No such file or directory
So, you guessed it: sudo apt-get install libbluetooth-dev. Then finally success! Finish with sudo python2.5 setup.py install and the GAE error goes away!