-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
On my macbook running Jupyter, From the below code, I get the error:
AttributeError: module 'google.cloud.storage' has no attribute 'Client'
Strangles the code Fails in Jupyter and Works in Interactive Mode (terminal)
I'm new to Google Cloud Storage, and help is appreciated...
much appreciation in advance
from google.cloud import storage
client = storage.Client(project="My Project")
bucket = client.get_bucket('my-bucket-name')
blob = bucket.blob('my-test-file.txt')
blob.upload_from_string('this is test content!')
-
Mac 10.12.6
-
Python 3.5.2 from Conda
-
Pip Version: pip 9.0.1 from //anaconda/envs/gcs/lib/python3.5/site-packages (python 3.5)
-
Pip Freeze for Google-Cloud (running under conda with a virtual environment: //anaconda/envs/gcs/bin/conda)
google-auth==1.0.2
google-cloud==0.27.0
google-cloud-bigquery==0.26.0
google-cloud-bigtable==0.26.0
google-cloud-core==0.26.0
google-cloud-datastore==1.2.0
google-cloud-dns==0.26.0
google-cloud-error-reporting==0.26.0
google-cloud-language==0.27.0
google-cloud-logging==1.2.0
google-cloud-monitoring==0.26.0
google-cloud-pubsub==0.27.0
google-cloud-resource-manager==0.26.0
google-cloud-runtimeconfig==0.26.0
google-cloud-spanner==0.26.0
google-cloud-speech==0.28.0
google-cloud-storage==1.3.2
google-cloud-translate==1.1.0
google-cloud-videointelligence==0.25.0
google-cloud-vision==0.26.0
google-gax==0.15.14
google-resumable-media==0.2.3
googleapis-common-protos==1.5.2 -
pip show google cloud
Name: google-cloud
Version: 0.27.0
Summary: API Client library for Google Cloud
Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python
Author: Google Cloud Platform
Author-email: [email protected]
License: Apache 2.0
Location: /anaconda/envs/gcs/lib/python3.5/site-packages
Requires: google-cloud-speech, google-cloud-bigtable, google-cloud-dns, google-cloud-core, google-cloud-datastore, google-cloud-error-reporting, google-cloud-bigquery, google-cloud-pubsub, google-cloud-translate, google-cloud-resource-manager, google-cloud-runtimeconfig, google-cloud-logging, google-cloud-language, google-cloud-videointelligence, google-cloud-monitoring, google-cloud-vision, google-cloud-storage, google-cloud-spanner