Monthly Archives: January 2011

Fixing appengine SSL error on Ubuntu 10.04

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!

Giving up the internet

I'm one of those people who often gets lost on Wikipedia. I also get distracted with the news. And Arts & Letters Daily and just about everything it links to. I've been know to follow several blogs. I spend too much time on Twitter pursuing the links that people share. All in all, I spend a lot of time reading and thinking about the wider world (or, really, just the parts of it that I am interested in).

This semester I'm much too busy to do this. I've got too many things to do to just keep up, one huge thing to get off the ground, and a giant plane to land before May. So, here it goes. I'm giving up the internet. I'll still blog because I need the practice writing, but unless it's a comment on the blog, I'm not going to follow it. Email will also work, if you want to get a hold of me. But I'm no longer allowing myself to check the dozens of RSS feeds I follow. No more twitter. No more news or blogs. I've got work-related reading to do if I'm bored. I'll come out of the cave eventually. This too shall pass.

moderncv won't work on Ubuntu 10.04 because of marvosym.sty

I'm updating my resume/cv for content and style. To help with the latter, I'm following some examples that use the moderncv LaTeX package.

I had trouble getting it to work. I like the look of this example, but I couldn't get the provided TeX to compile. Instead, the error I got was:

LaTeX Error: File `marvosym.sty' not found.

Googling didn't help me find an answer, so I searched the apt repository manually to see if this file was provided by a missing package:

root@gauze:~# apt-cache search marvosym
texlive-fonts-recommended - TeX Live: Recommended fonts
ttf-marvosym - Symbol font for school and office

Installing

root@gauze:~# apt-get install texlive-fonts-recommended

fixed the problem. So now, Google, index this page and be more useful to the future.

Revolution R with Eclipse Helios

One of the reasons that I don't often take advantage of the cool features in Revolution R is that I absolutely can't stand their Visual Studio interface. Previously, if I wanted to run something in RevoR, I fired up the RGui.exe that comes buried in their distribution and used R's built in script editor. My normal workflow is to use StatEt inside of Eclipse, so dealing with R's meager editor was always painful. (Although less painful than the bloated VS-standalone alternative.)

Over the break, I ran across Luke Miller's excellent post on getting Eclipse setup with StatEt the right way. I was able to follow his tutorial to get vanilla 64-bit R setup on a new installation of 64-bit Eclipse Helios. Once that was working, I changed two things to add a second shortcut for Revo R.

First, I followed his directions to install rJava in RevoR:

C:Usersnathanvan>cd C:RevolutionRevo-4.0RevoEnt64R-2.11.1bin
C:RevolutionRevo-4.0RevoEnt64R-2.11.1bin>R.exe

R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
...
Type 'revo()' to visit www.revolutionanalytics.com for the latest
Revolution R news, 'forum()' for the community forum, or 'readme()'
for release notes.

> install.packages("rJava")
...
package 'rJava' successfully unpacked and MD5 sums checked

The downloaded packages are in
C:UsersnathanvanAppDataLocalTempRtmpG3tMzbdownloaded_packages

And then installed rj in RevoR, once again using his directions.

C:RevolutionRevo-4.0RevoEnt64R-2.11.1bin>R CMD INSTALL --no-test-load "C:UsersnathanvanDownloadsrj_0.5.2-1.tar.gz"
...
* DONE (rj)

And finally setup Eclipse with a second Run Configuration which I named Revo-R-x64-2.11.1. Now I can run the 64bit version of RevoR without having to deal with the VisualStudio interface. If I get around to it, I'll post some performance numbers. (The last time I used the VS interface, it was noticeably slower than calling RGui.exe directly.)

A common one

After talking with Cosma Shalizi, I've decided to set my work-related New Year's Resolution as blogging once a week. This is more of a goal then a commitment; if I don't have anything useful to share or I don't have time to share it, there won't be a post. The hope is to be high-quality at low-volume. I intend to blog the afternoon after my Advanced Probability problem set is due.

I'll try to post (in roughly increasing frequency):

  1. General summaries of things that I finish (papers, released code, file-drawer projects).
  2. Small self contained bits of research when I can. These will be tidbits too small to go up on arXiv, but likely to be of use to at least someone. First up: subsetting rating data.
  3. Reviews of research aimed at a general audience with lots of links and as much context as I can muster.
  4. Ideas that I don't have time to pursue but would rather like someone else to actualize so that I could purchase their product/service.
  5. Reactions to scholarly ideas in the popular press. (If I'm training to become a public intellectual, I might as well start.)
  6. Snippets of code that may be of general use. (Including benchmarking and howto posts.)

Let's see if I can keep this up for at least a semester.