导入翻译自谷歌.cloud

2024-05-28 19:19:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用谷歌翻译软件包翻译文档谷歌.cloud 我已经做到了:

pip install google.cloud 

结果是:

Collecting google.cloud Using cached google_cloud-0.27.0-py2.py3-none-any.whl Requirement already satisfied: google-cloud-logging<1.3dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-bigtable<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-datastore<1.3dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-error-reporting<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-pubsub<0.28dev,>=0.27.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-core<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-storage<1.4dev,>=1.3.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-resource-manager<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-language<0.28dev,>=0.27.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-translate<1.2dev,>=1.1.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-speech<0.29dev,>=0.28.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-videointelligence<0.26dev,>=0.25.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-monitoring<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-spanner<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-runtimeconfig<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-vision<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-dns<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: google-cloud-bigquery<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud) Requirement already satisfied: gapic-google-cloud-logging-v2<0.92dev,>=0.91.0 in c:\anaconda\lib\site-packages (from google-cloud-logging<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: grpcio<2.0dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google-cloud-logging<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: google-gax<0.16dev,>=0.15.7 in c:\anaconda\lib\site-packages (from google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: gapic-google-cloud-datastore-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-datastore<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: gapic-google-cloud-error-reporting-v1beta1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-error-reporting<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud) Requirement already satisfied: protobuf>=3.0.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: tenacity<5.0.0dev,>=4.0.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: requests<3.0.0dev,>=2.4.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: google-auth<2.0.0dev,>=0.4.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: googleapis-common-protos>=1.3.4 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: six in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: google-resumable-media>=0.2.3 in c:\anaconda\lib\site-packages (from google-cloud-storage<1.4dev,>=1.3.0->google.cloud) Requirement already satisfied: gapic-google-cloud-spanner-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: gapic-google-cloud-spanner-admin-database-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: gapic-google-cloud-spanner-admin-instance-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-logging-v2[grpc]<0.92dev,>=0.91.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: oauth2client<4.0dev,>=2.0.0 in c:\anaconda\lib\site-packages (from gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: dill<0.3dev,>=0.2.5 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: ply==3.8 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: future<0.17dev,>=0.16.0 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-datastore-v1[grpc]<0.91dev,>=0.90.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-datastore-v1<0.16dev,>=0.15.0->google-cloud-datastore<1.3dev,>=1.2.0->google.cloud) Requirement already satisfied: proto-google-cloud-error-reporting-v1beta1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-error-reporting-v1beta1<0.16dev,>=0.15.0->google-cloud-error-reporting<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-pubsub-v1[grpc]<0.16dev,>=0.15.4 in c:\anaconda\lib\site-packages (from gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0->google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud) Requirement already satisfied: grpc-google-iam-v1<0.12dev,>=0.11.1 in c:\anaconda\lib\site-packages (from gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0->google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud) Requirement already satisfied: setuptools in c:\anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg (from protobuf>=3.0.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: monotonic>=0.6 in c:\anaconda\lib\site-packages (from tenacity<5.0.0dev,>=4.0.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: cachetools>=2.0.0 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: rsa>=3.1.4 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: pyasn1>=0.1.7 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-spanner-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-spanner-admin-database-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-admin-database-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: proto-google-cloud-spanner-admin-instance-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-admin-instance-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud) Requirement already satisfied: httplib2>=0.9.1 in c:\anaconda\lib\site-packages (from oauth2client<4.0dev,>=2.0.0->gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud) Installing collected packages: google.cloud Successfully installed google.

然后我调用了Spyder(Python3.5)中的包:

^{pr2}$

我得到了这个错误:

Traceback (most recent call last):

File "", line 2, in from google.cloud import translate

File "C:\Anaconda\lib\site-packages\google\cloud\translate.py", line 18, in from google.cloud.translate_v2 import version

File "C:\Anaconda\lib\site-packages\google\cloud\translate_v2__init__.py", line 19, in version = get_distribution('google-cloud-translate').version

File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources__init__.py", line 535, in get_distribution dist = get_provider(dist)

File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources__init__.py", line 415, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]

File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources__init__.py", line 943, in require needed = self.resolve(parse_requirements(requirements))

File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources__init__.py", line 834, in resolve raise VersionConflict(dist, req).with_context(dependent_req)

ContextualVersionConflict: (pyasn1 0.1.9 (c:\anaconda\lib\site-packages), Requirement.parse('pyasn1==0.3.3'), {'pyasn1-modules'})


Tags: infromdevcloudlibpackagesgooglesite

热门问题