我正在尝试使用colab的批处理集成模型。pip安装:
!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.
这似乎是我无法解决的循环依赖关系,它与Tensor相关,而与我试图使用的特定存储库无关。
暂无答案!
目前还没有任何答案,快来回答吧!