All relevant imports are put in `try` blocks so that they work in both ST2 and ST3, since some libraries have moved around in Python 3.