Hey Juan, I believe I've figured out what When running in development, packages installed to your python system can appear to resolve dependencies. These will be absent in production for the reason that only your app's folder is uploaded, not all the python packages on your system.
For this reason, many developers work within a virtualenv <https://virtualenv.pypa.io/en/latest/>, so that outside dependencies don't come into the equation. Within the virtualenv, you shouldn't global-install packages, but should install them to a subfolder of your project and explicitly add these using vendoring <https://cloud.google.com/appengine/docs/python/tools/libraries27>. If you inspect the python path (sys.path) in the non-failing example as you currently have it, you'll notice system folders in the path. In production, you'll notice these are missing if you inspect sys.path there. I hope this has helped clarify the issue as to why you're seeing an ImportError in production and not in dev. Feel free to post a reply if you find something different. Best regards, Nick Cloud Platform Community Support On Tuesday, March 29, 2016 at 6:54:57 AM UTC-4, Juan Antonio Fernández Sánchez wrote: > > I'm trying upload images to a bucket in Cloud Storage from an app in GAE > and I can't find the way to do this. > I don't have problems when I try do this with a simple program written in > python using the library gcloud, this work fine and I can see the pictures > in a bucket with the web console but when I try do this inside GAE app (I > install gcloud library in /lib folder before) always I find the same error > when I import the gcloud library to use: > > raise ImportError('No module named %s' % fullname) > ImportError: No module named cryptography.hazmat.bindings._openssl > > And I don't undesrtand why when use the library in my localhost this work > fine but not inside GAE app. > > I thought use JSON API for do this but I want know how is the problem > before to change the way to do this. > > Thanks you so much for any help, and sorry for my english. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/30d71bc1-9bb6-4b18-b798-24f317c226da%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.