I have python 3. I installed \"Theano\" bleeding edge and \"Keras\" using
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
The problem seems to be with your g++ compiler. Try uninstalling it and running your script again. It'll spit a warning implying a degradation in performance, but it'll work nonetheless.
'Python 3.6.3 |Anaconda custom (32-bit)|
(default, Oct 15 2017, 07:29:16)
[MSC v.1900 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 6.1.0 -- An enhanced Interactive Python.
import theano
WARNING (theano.tensor.blas): Using NumPy C-API based implementation
for BLAS functions.
'