Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named google_compute_engine

I used google compute engine from Google Cloud Platform , and I want to store my data in googles storage, so I used the gsutil to send data from compute engine to google storage

Before i updated python2.6.6 to python2.7, gsutil was working fine. But after update to 2.7

enter image description here

it took me lots of time...

P.S I use CenOS6.7

like image 434
Shiue-yang Shiau Avatar asked Aug 05 '16 07:08

Shiue-yang Shiau


3 Answers

This worked for me:

vim /etc/boto.cfg

Find the directive where it says:

[Plugin]
plugin_directory = /usr/lib/python3/dist-packages/google_compute_engine/boto

And comment out the plugin_directory by placing the # at the start of the line:

[Plugin]
#plugin_directory = /usr/lib/python3/dist-packages/google_compute_engine/boto

Or, set the BOTO_CONFIG environment variable in the same command:

BOTO_CONFIG=/dev/null gsutil <your command here> ...

like image 119
d-_-b Avatar answered Sep 29 '22 13:09

d-_-b


I had exactly the same problem, and I solved it by removing boto settings:

sudo rm -f /etc/boto.cfg
like image 32
tashuhka Avatar answered Oct 16 '22 20:10

tashuhka


This is related to this issue.

Can be solved by running export BOTO_CONFIG=/dev/null before running gsutil

like image 16
Alex Simenduev Avatar answered Oct 16 '22 22:10

Alex Simenduev