Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't import google.cloud.vision

I'm using Anaconda, and I'm trying to use google cloud vision, but I cannot import google cloud vision. I can import google cloud, but it throws an error below.

from google.cloud import vision
ImportError: cannot import name 'vision'

What module should I import with anaconda? (I've already imported google-api-core, google-auth, google-cloud-bigquery, google-cloud-core, google-cloud-sdk, google-cloud-storage, google-resumable-media, google-resumable-media, googleapis-common-protos)

Could anyone solve this? Thanks in advance.

like image 343
joey22 Avatar asked Aug 17 '18 11:08

joey22


People also ask

How do I get Google Cloud Vision API?

You need to create a project in the Google cloud, give it a credit card number, enable the GCV API, and then get an API key. You won't be charged anything unless you make 1000 API calls in a month; but then you start paying, so be careful!


2 Answers

You may need to add a dependency to google-cloud-vision.

like image 109
norbjd Avatar answered Oct 07 '22 23:10

norbjd


You can install google-cloud-vision by typing:

sudo pip install google-cloud-vision
like image 8
Shan Ali Avatar answered Oct 07 '22 23:10

Shan Ali