I am current getting the error
ImportError: cannot import name gof
when importing theano.
>>> import
In my case, the fix was to install a python build that's callable as a shared library:
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.15