-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On new debian 8 installs using google_compute_engine virtualenv installed boto is broken #262
Comments
Hi, we'll see if we can figure out what is going on here. Can you describe why you are using a virtual env for boto and also how are you setting this up (which version etc) so we can reproduce? |
Yeah so that setups loading plugins from a package that doesn't exist in the virtualenv |
Grab a normal GCE image from the current debian-8, create a virtualenv, install boto, try and import boto. Kaboom. |
The old |
To summarize the issue:
In order to use boto from inside a virtualenv, you can set your Python path with the command: |
You can also create a virtualenv that includes the system site packages ( |
One of the reasons behind the improved packaging is to enable PyPI distribution of the Linux guest environment, which is currently in progress. |
In that case I'd recommend noting a work around for anyone else running their own code using boto on GCE create any virtualenvs with |
I've updated the README to include troubleshooting instructions for using boto. |
We now have a PyPI package for the Linux guest environment. The package is available using: |
I also got an error with boto installation in Python 3 on Google Dataproc instances running Debian 8.
when I try to import boto in python 3 ... I get the following error: File "/usr/local/lib/python3.4/dist-packages/boto/plugin.py", line 75, in _import_module After a long time of investigation, I guessed the problem. Boto saves its config in /etc/boto.cfg . [Plugin] The /etc/boto.cfg file is usually managed using scripts, so I just included this command in my bash script just after google-compute-engine package install, to update /etc/boto.cfg with the correct plugin_directory (/usr/local/lib/python3.4/dist-packages/google_compute_engine/boto)
Just sharing in the case anyone runs into the same problem involving this setup: Dataproc (Image version v1.0), Python3 and boto. |
The Dataproc images have not updated to the new guest environment. When they next update their images, they should hopefully pick up the new guest environment and work the same as the standard Debian 8 images on Google Compute Engine. |
Been hitting this (on travis-ci 14.04). Seems like google-compute-engine has a cyclic dependency on boto. Global system-wide side effects are bad (lead into such trouble), this should be fixed at design level. |
The suggested solution (adding system packages to the virtualenv or installing google-compute-engine into it) are not sufficient. Python virtualenvs are isolated from system packages (by default) for a reason, you want to be able to control where modules are imported from in a virtualenv. You should also not have to pip install a gce library into a virtualenv that doesn't use/need it just to be able to run boto. I do find this to be an issue with boto itself, but google also has a responsibility here. I don't know why you can't just define the boto config file locally for projects using this, but if that's not the case can't you at least catch the import errors of |
Not exactly sure what's going on here but we are now seeing:
Note that this is a virtualenv installed copy of boto which ends up failing with an error in
google_compute_engine
s vendoring(?) of boto?The text was updated successfully, but these errors were encountered: