Instalación de icalendar (u otros módulos de Python) en el proyecto de Google App Engine

I'm trying to install the icalendar Python module for use in my Google App Engine project. I have created a Python virtual environment in my project folder, and installed the icalendar package in it. If I run the Python interpreter from the venv, I can import icalendar and use it just fine (help(icalendar) shows it's getting the module from the correct path: venv/lib/python2.7/site-packages/icalendar). I have created a symlink called icalendar pointing to that directory in my project root (same place as app.yaml). The project can deploy and run on GAE, but anytime it tries to use icalendar, I get "Cannot import module 'icalendar'".

I used the exact same steps to install the Twilio library in my app, which worked fine. If I don't include the symlink to the Twilio module, the error message is actually 'No module named twilio', instead of "Cannot import..". Not sure if that's relevant.

He visto esto:!topic/google-appengine/FM_NXd9cbus, which is exactly my problem, but there was no solution!

¿Qué estoy haciendo mal?

Edit: I also tried just putting the icalendar module directory in the project root, w/o the symlink. No difference.

preguntado el 05 de mayo de 13 a las 19:05

1 Respuestas

Tienes que comprobar how to use python libraries in GAE.

Pay attention as the docs are a bit confusing, you need to pick one (and only one) solution for a library, you can't mix both (they're both chapters on the above-mentioned page):

  • Requesting a library - for libs supplied by GAE - for these check notes for what you may need to do for your local development server
  • Installing a library - for additional libraries you need to include in your app - for these check also the restrictions the library needs to meet

Respondido 26 ago 16, 01:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.