Name in conflict with Theano

I try to import theano into a module, but I get traceback:

File "/media/tarun/6A86CA8286CA4DEF/develop/pydy/pydy/codegen/code.py", line 16, in <module>
import theano
File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 44, in <module>
from theano.gof import \
File "/usr/local/lib/python2.7/dist-packages/theano/gof/__init__.py", line 38, in <module>
from theano.gof.cc import \
File "/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py", line 55, in <module>
StrParam(""))
File "/usr/local/lib/python2.7/dist-packages/theano/configparser.py", line 223, in AddConfigVar
  root=newroot, in_c_key=in_c_key)
File "/usr/local/lib/python2.7/dist-packages/theano/configparser.py", line 227, in AddConfigVar
configparam.fullname)
AttributeError: ('This name is already taken', 'gcc.cxxflags')

There seems to be a name conflict in some configurations. Can anyone point me to the same thing.

+4
source share
2 answers

This error occurs because some module may theano.gofbe imported twice. This usually happens because the first call is launched import theano.gof, registering the 'gcc.cxxflags'configuration with the parser for the first time, but then picks up ImportError, which is caught and ignored. Then import theano.gofit is called again, it tries to register the parameter again, which raises the exception that you get.

, -, , ?

+2

jupyter. .

0

All Articles