Table Of Contents

This Page

Compatibility with Python versions.

Theano is compatible with Python versions >= 2.4 including 3.x series. This guide provides coding guidelines on how to maintain comnpatibility.

Installation (2to3 and setup.py)

Python code compatibility

Compatibility package (theano.compat)

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

Strings, bytes and unicode

C code compatibility

Module initialization

PyCapsule and PyCObject

References