Skip to content

Error running "from google.cloud import storage" command #4039

Closed
@ep-tpat

Description

Thank you for reporting an issue to google-cloud-python!

If you are reporting an issue or requesting a feature, please search the
existing open and closed issues to see if there is already work being done.

If you can provide us with as much of the following information as possible it
will help us identify the cause of your issue more quickly.


Hello, I'm hoping you can help. I'm trying to run the Python Client Library for Google Compute and running into issues. See below for my information. Thanks for any help you can provide.

1. OS type and version
$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

2. Python version and virtual environment information python --version
$ python3 -V
Python 3.4.5

3. google-cloud-python version pip show google-cloud, pip show google-<service> or pip freeze
$ pip3 freeze | grep ^google
google-auth==1.1.1
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.15
google-resumable-media==0.2.3
googleapis-common-protos==1.5.2

4. Stacktrace if available
- See below

5. Steps to reproduce
- from a fresh CentOS 7 VM in Google Compute, I ran the following commands:
sudo yum -y install epel-release
sudo yum -y install python34
sudo yum -y install python34-devel
sudo yum -y install python34-setuptools
sudo python3 /usr/lib/python3.4/site-packages/easy_install.py pip
sudo pip3 install --upgrade pip
pip3 install --upgrade google-cloud

- from python IDLE, ran the following command:
from google.cloud import storage
- error received:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.4/site-packages/google/cloud/storage/init.py", line 37, in
from google.cloud.storage.batch import Batch
File "/usr/lib/python3.4/site-packages/google/cloud/storage/batch.py", line 29, in
from google.cloud import _helpers
File "/usr/lib/python3.4/site-packages/google/cloud/_helpers.py", line 33, in
from google.protobuf import duration_pb2
ImportError: No module named 'google.protobuf'

6. Code example
N/A
Using GitHub flavored markdown can help make your request clearer.
See: https://guides.github.com/features/mastering-markdown/

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions