remove Theano many times. Make sure you can't import it in python. Then
delete your Theano cache (probably under ~/.theano except if you changed
the default config)

Then reinstall Theano.

Fred

On Fri, Apr 7, 2017 at 2:38 PM Viswak nawin K.S <
[email protected]> wrote:

> I am also facing issues like this when importing keras. How to resolve it
>
> Using Theano backend.
>
> /Users/viswak/anaconda/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 "<stdin>", line 1, in <module>
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/keras/__init__.py",
> line 3, in <module>
>
>     from . import activations
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/keras/activations.py",
> line 3, in <module>
>
>     from . import backend as K
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/keras/backend/__init__.py",
> line 61, in <module>
>
>     from .theano_backend import *
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/keras/backend/theano_backend.py",
> line 3, in <module>
>
>     import theano
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/theano/__init__.py",
> line 80, in <module>
>
>     from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/theano/scan_module/__init__.py",
> line 41, in <module>
>
>     from theano.scan_module import scan_opt
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/theano/scan_module/scan_opt.py",
> line 60, in <module>
>
>     from theano import tensor, scalar
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/theano/tensor/__init__.py",
> line 9, in <module>
>
>     from theano.tensor.subtensor import *
>
>   File
> "/Users/viswak/anaconda/lib/python2.7/site-packages/theano/tensor/subtensor.py",
> line 27, in <module>
>
>     from cutils_ext.cutils_ext import inplace_increment
>
> ImportError: cannot import name inplace_increment
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to