为Anaconda版本的Python安装源代码后导入Pyro时出错

时间:2019-04-23 01:31:46

标签: python anaconda pytorch

我使用“从源代码安装”链接下的源代码安装说明here下载了Pyro,因为在安装到Anaconda安装程序时,总是被告知不要使用pip。当我尝试import pyro时,出现下面的属性错误

import pyro
Traceback (most recent call last):

  File "<ipython-input-48-05a8cb49cc0d>", line 1, in <module>
    import pyro

  File "C:\Users\bjwil\Anaconda3\Lib\site-packages\pyro\__init__.py", line 6, in <module>
    from pyro.primitives import (clear_param_store, enable_validation, get_param_store, iarange, irange, module, param,

  File "C:\Users\bjwil\Anaconda3\Lib\site-packages\pyro\primitives.py", line 10, in <module>
    import pyro.infer as infer

  File "C:\Users\bjwil\Anaconda3\Lib\site-packages\pyro\infer\__init__.py", line 14, in <module>
    from pyro.infer.traceenum_elbo import JitTraceEnum_ELBO, TraceEnum_ELBO

  File "C:\Users\bjwil\Anaconda3\Lib\site-packages\pyro\infer\traceenum_elbo.py", line 183, in <module>
    class BackwardSampleMessenger(pyro.poutine.messenger.Messenger):

AttributeError: module 'pyro.poutine' has no attribute 'messenger'

这没有多大意义,因为在poutine文件夹中,我有messenger文件,并且它具有类Messenger,因此{{ 1}}文件应该可以正常工作。

0 个答案:

没有答案