ImportError: No module named google_compute_engine
Asked Answered
M

3

15

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

Markmarkdown answered 5/8, 2016 at 7:4 Comment(0)
V
35

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

sudo rm -f /etc/boto.cfg
Valvulitis answered 6/10, 2017 at 13:32 Comment(0)
M
17

This is related to this issue.

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

Murrain answered 26/12, 2017 at 12:40 Comment(0)
N
5

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> ...

Negrophobe answered 10/2, 2019 at 2:33 Comment(1)
While this might work, it's not a durable solution, because the /etc/boto.cfg file contains an explicit warning at the top: "This file is automatically created at boot time [...] Do not edit this file directly"Evangelinaevangeline

© 2022 - 2024 — McMap. All rights reserved.