title: Theano with Anaconda on Windows: how to setup BLAS?
body: <p>I've used Anaconda to install Theano (and Keras) on Windows 7 64bit.
  Here are my steps.</p>
  
  <ol>
  <li>Install the latest Anaconda for Python 3.5</li>
  <li>conda install mingw libpython</li>
  <li>pip install Theano</li>
  <li>conda install pydot-ng</li>
  <li>pip install keras</li>
  <li>Edit .keras/keras.json to use "theano" instead of "tensorflow".</li>
  </ol>
  
  <p>Open Jupyter, copy and paste this code: <a href="https://github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py" rel="nofollow noreferrer">https://github.com/fchollet/keras/blob/master/examples/cifar10_cnn.py</a>
  It executes fine until the call to model.fit : imports, data download, model compilation all work.</p>
  
  <p>Please note that I set data_augmentation to False.</p>
  
  <p>The call to model.fit fails with the following error message:<a href="http://pastebin.com/Rq7HTc4H" rel="nofollow noreferrer">http://pastebin.com/Rq7HTc4H</a></p>
  
  <p>This seems to be the problem: </p>
  
  <blockquote>
    <p>AssertionError: AbstractConv2d Theano optimization failed: there is no
    implementation available supporting the requested options. Did you
    exclude both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU,
    is cuDNN available and does the GPU support it? If on CPU, do you have
    a BLAS library installed Theano can link against?</p>
  </blockquote>
  
  <p>I didn't install BLAS myself, I thought that would be a part of Anaconda.
  Browsing the internet reveals similar problems.
  Apparently you can prevent Theano from looking for a BLAS library by editing a .theanorc.txt file and adding "optimizer = None": <a href="https://stackoverflow.com/questions/28011551/how-configure-theano-on-windows">How configure theano on Windows?</a></p>
  
  <p>I executed <code>os.path.expanduser('~/.theanorc.txt')</code>, verified that my .theanorc.txt is in the right place, added the optimier=None line and tried the code again.
  No effect.</p>
  
  <p>How can I configure Theano to work without BLAS ?
  Or, even better, how can I install a BLAS library (preferably via Anaconda) ?</p>
  
  <p><strong>UPDATE:</strong>
  Apparently you can edit the config during runtime:</p>
  
  <pre><code>import theano
  theano.config.optimizer="None"
  </code></pre>
  
  <p>removes the problem.</p>
  
  <p>This means that Theano doesn't find my config file.
  I thought I had put it at the correct location, what might prevent Theano from finding it ?</p>