由于树模块,无法导入tensorflow_概率

wfypjpf4  于 2021-08-25  发布在  Java
关注(0)|答案(0)|浏览(264)

当尝试导入时 tensorflow_probability 我得到以下错误。模块版本为0.13.0,所有内容都是最新的,包括树模块(0.2.4)

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    import tensorflow_probability as tfp
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\__init__.py", line 23, in <module>
    from tensorflow_probability.python import *  # pylint: disable=wildcard-import
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\__init__.py", line 142, in <module>
    dir(globals()[pkg_name])  # Forces loading the package from its lazy loader.
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\lazy_loader.py", line 61, in __dir__
    module = self._load()
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\lazy_loader.py", line 44, in _load
    module = importlib.import_module(self.__name__)
  File "C:\Users\adame\Python\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\experimental\__init__.py", line 35, in <module>
    from tensorflow_probability.python.experimental import bijectors
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\experimental\bijectors\__init__.py", line 17, in <module>
    from tensorflow_probability.python.bijectors.ldj_ratio import forward_log_det_jacobian_ratio
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\bijectors\__init__.py", line 23, in <module>
    from tensorflow_probability.python.bijectors.absolute_value import AbsoluteValue
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\bijectors\absolute_value.py", line 23, in <module>
    from tensorflow_probability.python.bijectors import bijector
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\bijectors\bijector.py", line 36, in <module>
    from tensorflow_probability.python.internal import prefer_static as ps
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\prefer_static.py", line 30, in <module>
    from tensorflow_probability.python.internal.backend import numpy as nptf
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\__init__.py", line 22, in <module>
    from tensorflow_probability.python.internal.backend.numpy import bitwise
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\bitwise.py", line 23, in <module>
    from tensorflow_probability.python.internal.backend.numpy import _utils as utils
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\_utils.py", line 26, in <module>
    from tensorflow_probability.python.internal.backend.numpy import nest
  File "C:\Users\adame\Python\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\nest.py", line 34, in <module>
    from tree import _assert_shallow_structure
ImportError: cannot import name '_assert_shallow_structure' from 'tree' (C:\Users\adame\Python\Lib\idlelib\tree.py)

我不知道该怎么办,我也不想碰模块代码,帮帮忙?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题