Theano is compatible with Python versions >= 2.6 including 3.x series. This guide provides coding guidelines on how to maintain comnpatibility.
Compatibility between 2.x and 3.x is implemented using six, a Python 2 and 3 compatibility library by Benjamin Peterson. A copy of six library is included in theano.compat package, but it should not be called directly. Instead, use symbols exposed at the package level.
Correct:
from theano.compat import b
Incorrect:
from theano.compat.six import b
from six import b