-1

我正在尝试将批处理集成模型与 Colab 一起使用。点安装:

!pip install "git+https://github.com/google/uncertainty-baselines.git#egg=uncertainty_baselines"

并得到以下错误:

ERROR: tensorflow 2.5.0 has requirement keras-nightly~=2.5.0.dev, but you'll have keras-nightly 2.7.0.dev2021070800 which is incompatible.
ERROR: tf-nightly 2.7.0.dev20210708 has requirement grpcio<2.0,>=1.37.0, but you'll have grpcio 1.34.1 which is incompatible.

一旦我尝试使用导入来使用库:

import uncertainty_baselines as ub

它引发了这个错误

ImportError: cannot import name '__version__' from 'keras' (/usr/local/lib/python3.7/dist-packages/keras/__init__.py)

所以我尝试手动修复包的版本,我尝试首先安装以下包和依赖项:

!pip install keras-nightly==2.5.0.dev2021020510
!pip install grpcio==1.34.0
!pip install tensorflow==2.5.0
!pip install tf-nightly==2.7.0.dev20210708

但它会引发以下错误:

ERROR: tf-nightly 2.7.0.dev20210708 has requirement grpcio<2.0,>=1.37.0, but you'll have grpcio 1.34.1 which is incompatible.
ERROR: tf-nightly 2.7.0.dev20210708 has requirement keras-nightly~=2.7.0.dev, but you'll have keras-nightly 2.5.0.dev2021020510 which is incompatible

同样,我尝试修复版本:

!pip install keras-nightly==2.7.0.dev2021070800
!pip install grpcio==1.37.0
!pip install tensorflow==2.5.0
!pip install tf-nightly==2.7.0.dev20210708

但现在它引发了以下错误:

ERROR: tensorflow 2.5.0 has requirement grpcio~=1.34.0, but you'll have grpcio 1.37.0 which is incompatible.
ERROR: tensorflow 2.5.0 has requirement keras-nightly~=2.5.0.dev, but you'll have keras-nightly 2.7.0.dev2021070800 which is incompatible.

这似乎是我无法解决的循环依赖关系,并且与张量相关,而不是与我尝试使用的特定存储库相关。

编辑:

已通过删除 tf-nightly 依赖项解决了此存储库的问题(在新 MR 后删除)

4

1 回答 1

0

新的 MR 解决了这个问题 - github.com/google/uncertainty-baselines/issues/407

tf-nightly 的依赖被移除。

于 2021-09-25T08:50:17.820 回答