pip安装gsutil会导致过多不兼容的依赖项

时间:2018-07-16 23:22:04

标签: google-cloud-platform gsutil

运行pip install -U pip时,出现以下错误:

proto-google-cloud-spanner-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-spanner-admin-instance-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-spanner-admin-database-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-logging-v2 0.91.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-error-reporting-v1beta1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
proto-google-cloud-datastore-v1 0.90.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-spanner-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-spanner-admin-instance-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-spanner-admin-database-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-pubsub-v1 0.15.4 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-logging-v2 0.91.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-error-reporting-v1beta1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.
gapic-google-cloud-datastore-v1 0.15.3 has requirement oauth2client<4.0dev,>=2.0.0, but you'll have oauth2client 4.1.2 which is incompatible.

这显然是因为我使用了pip install gsutil,根据this,它是实验性的。我一直在尝试卸载它和其他软件包,并且还尝试降级oauth2client,尽管该降级显然也已被弃用,但是我最终遇到了太多其他不兼容的依赖项。有任何快速解决方法吗?

1 个答案:

答案 0 :(得分:1)

要使用gsutil,没有什么比安装Google CloudSDK更好的了。有什么理由不走那条路吗?

如果您要清除不良的pip install的gsutil,那么您将想要

  1. 完全清除pip安装包
  2. 安装Cloud SDK

然后进行基本的Linux软件安装,例如查看您的PATH以确保gsutilgcloud处于“正常运行”状态。如果事情变暗,请使用which gsutil