0

I have an App Engine project which I’d like to start using SendGrid with. I downloaded and installed the library and I can import sendgrid normally from the Python terminal. However, when I type import sendgrid in the GAE code, it gives me the following error message:

import sendgrid
ImportError: No module named sendgrid

I downloaded the SendGrid folder from GitHub and put it in the lib directory of my project. What am I missing?

Y2H
  • 2,419
  • 1
  • 19
  • 37

1 Answers1

0

This can be solved by installing SendGrid directly in lib dir of your project.

> pip install sendgrid -t lib

In order to do this, you need to have appengine_config.py in your root directory. It allows you to include third-party packages and its contents look like this:

from google.appengine.ext import vendor

vendor.add('lib')

Then you just call import sendgrid and you are ready to go.

bashmaistora
  • 16
  • 1
  • 1