title: Theano ImportError: cannot import name inplace_increment
body: <p>I've installed Theano as such:</p>
  
  <pre><code>(python2) bash-3.2$ sudo pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
  </code></pre>
  
  <p>I'm using conda with Python 2.7. The <code>python2</code> in parentheses is my conda environment. I'm trying to run the code from iGAN: <a href="https://github.com/junyanz/iGAN" rel="nofollow noreferrer">https://github.com/junyanz/iGAN</a>. I'm on OS X 10.11.6.</p>
  
  <p>The error I get is <code>ImportError: cannot import name inplace_increment</code>. I've tried manually removing the Theano cache (as described in <a href="https://github.com/Theano/Theano/issues/5564" rel="nofollow noreferrer">https://github.com/Theano/Theano/issues/5564</a>) and the same error still arises. (I can't use <code>theano-cache purge</code> because it requires installing a version of scipy that clashes with the version required by OpenCV.) I've also tried uninstalling and reinstalling Theano via pip and still get the same error. Any suggestions?</p>
  
  <p>Here's the context:</p>
  
  <pre><code>(python2) bash-3.2$ python iGAN_main.py 
  //anaconda/envs/python2/lib/python2.7/site-packages/numpy/lib/utils.py:254: FutureWarning: Numpy has detected that you (may be) writing to an array returned
  by numpy.diagonal or by selecting multiple fields in a record
  array. This code will likely break in the next numpy release --
  see numpy.diagonal or arrays.indexing reference docs for details.
  The quick fix is to make an explicit copy (e.g., do
  arr.diagonal().copy() or arr[['f0','f1']].copy()).
    ai = a.__array_interface__
  Traceback (most recent call last):
    File "iGAN_main.py", line 9, in &lt;module&gt;
      import constrained_opt
    File "/Users/.../Desktop/Code/iGAN/constrained_opt.py", line 3, in &lt;module&gt;
      from lib.rng import np_rng
    File "/Users/.../Desktop/Code/iGAN/lib/rng.py", line 2, in &lt;module&gt;
      from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
    File "//anaconda/envs/python2/lib/python2.7/site-packages/theano/__init__.py", line 102, in &lt;module&gt;
      from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File "//anaconda/envs/python2/lib/python2.7/site-packages/theano/scan_module/__init__.py", line 41, in &lt;module&gt;
      from theano.scan_module import scan_opt
    File "//anaconda/envs/python2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 60, in &lt;module&gt;
      from theano import tensor, scalar
    File "//anaconda/envs/python2/lib/python2.7/site-packages/theano/tensor/__init__.py", line 9, in &lt;module&gt;
      from theano.tensor.subtensor import *
    File "//anaconda/envs/python2/lib/python2.7/site-packages/theano/tensor/subtensor.py", line 27, in &lt;module&gt;
      from cutils_ext.cutils_ext import inplace_increment
  ImportError: cannot import name inplace_increment
  </code></pre>