15

I am relatively new to Python and I am stuck on something which is probably relatively easy to resolve.

I have installed the following packages:

pip install --upgrade google-api-python-client
pip install --upgrade google-cloud
pip install --upgrade google-cloud-vision

In my Python file I have:

import cv2
import io
import os

# Imports the Google Cloud client library
from google.cloud import vision

...etc...

And this gives me the error:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    from google.cloud import vision
ImportError: No module named 'google.cloud'

What am I missing and where should I look (logs?) to find the answer in the future.

PS:
Pip installs of google-cloud and google-cloud-vision have the output:

Cannot remove entries from nonexistent file /Users/foobar/anaconda/lib/python3.5/site-packages/easy-install.pth

UPDATE:
Running pip freeze doesn't show the packages to be installed...

pm0733464
  • 2,862
  • 14
  • 16
Bob van Luijt
  • 7,153
  • 12
  • 58
  • 101

3 Answers3

4

I had a similar problem. Adding "--ignore-installed" to my pip command made it work for me.

This might be a bug in pip - see this page for more details: https://github.com/pypa/pip/issues/2751

John
  • 56
  • 2
0

You need to download and install the google-cloud-sdk. Follow this link https://cloud.google.com/sdk/docs/

-6

try this :

from google.cloud.vision import *
Dadep
  • 2,796
  • 5
  • 27
  • 40
VjyAnnd
  • 1
  • 3