2017-01-24 163 views
4

我对Python相对来说比较新,而且我遇到了一些可能相对容易解决的问题。如何用Python pip安装google.cloud?

我已经安装了以下软件包:

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

在我的Python的文件我有:

import cv2 
import io 
import os 

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

...etc... 

这给我的错误:

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

我在想什么我应该在哪里寻找(日志?)以便在未来找到答案。

PS:
皮普安装的google-cloudgoogle-cloud-vision具有输出:

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

UPDATE
运行pip freeze不显示将要安装的软件包...

+0

上述内容适用于Windows和Ubuntu(使用Python 3.5)。也许在新的conda环境中再试一次? –

+0

嗯,不,不,伎俩要么... –

+0

也更新了问题... –

回答