AttributeError:模块'theano'没有属性'compile'

时间:2018-05-17 15:28:58

标签: python python-3.x theano pymc3

我正在使用Windows 10,python 3.4,Anaconda发行版并在导入PyMC3或Theano时出现此错误。快速谷歌搜索没有返回任何有用的东西......任何人都知道发生了什么以及如何解决它?提前谢谢!

import pymc3
Traceback (most recent call last):
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2910, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-200e74b8195d>", line 1, in <module>
import pymc3
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\__init__.py", line 5, in <module>
from .distributions import *
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\distributions\__init__.py", line 1, in <module>
from . import timeseries
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\distributions\timeseries.py", line 1, in <module>
import theano.tensor as tt
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\__init__.py", line 124, in <module>
from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\scan_module\__init__.py", line 41, in <module>
from theano.scan_module import scan_opt
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\scan_module\scan_opt.py", line 60, in <module>
from theano import tensor, scalar
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\__init__.py", line 38, in <module>
from theano.tensor import nnet  # used for softmax, sigmoid, etc.
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\nnet\__init__.py", line 2, in <module>
from .nnet import (
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\nnet\nnet.py", line 32, in <module>
from theano.tensor.nnet.sigm import sigmoid, softplus
File "C:\Users\p\AppData\Roaming\JetBrains\PyCharm Community Edition 2018.1.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\p\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\nnet\sigm.py", line 275, in <module>
theano.compile.optdb['uncanonicalize'].register("local_ultra_fast_sigmoid",
AttributeError: module 'theano' has no attribute 'compile

0 个答案:

没有答案