【问题标题】:AttributeError: module 'tensorflow_core.compat.v2' has no attribute '__internal__' (Worked a week ago?)AttributeError:模块'tensorflow_core.compat.v2'没有属性'__internal__'(一周前工作?)
【发布时间】:2021-07-14 05:10:12
【问题描述】:

Image: Error Message and Script

我在 Google Colab 工作,对 Python 没有太多经验。上图的代码来自https://github.com/smousavi05/EQTransformer

EQTransformer 安装的包有:

EQTransformer-0.1.59  
SecretStorage-3.3.1  
cryptography-3.4.7  
gast-0.2.2  
h5py-2.10.0  
jeepney-0.6.0  
keras-2.3.1  
keras-applications-1.0.8  
keyring-23.0.1  
pkginfo-1.7.0  
tensorboard-2.0.2  
tensorflow-2.0.0  
tensorflow-estimator-2.0.1  
tqdm-4.48.0  

运行 EQTransformer 安装时也出现错误

ERROR: tensorflow-probability 0.12.1 has requirement gast>=0.3.2, but you'll have gast 0.2.2 which is incompatible.

我已尝试安装较新的 gast,但 Tensorflow 2.0 需要较旧的 gast。 我也尝试安装 tensorflow-probability 0.9.0 以与 0.2.2 gast 兼容,但我仍然有同样的错误。

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    ! pip install tensorflow==1.15.0 ! pip 卸载 keras-nightly ! pip install keras==2.0.8 像这样

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-03
      • 2021-08-14
      • 1970-01-01
      • 2018-04-14
      相关资源
      最近更新 更多