shahzeb akram shahzeb akram - 1 month ago 30
Python Question

python google app engine stripe integration

I am working on a project in which i want to integrate stripe for payments. I am following their documentation to integrate it in python Stripe Documentation. In documentation they downloaded the stripe library to use it. The code to download it was:

pip install --upgrade stripe

I followed the same steps. But i am getting this error. When i try to import it in my project.

import stripe
ImportError: No module named stripe


The proper way to install a 3rd party library into your GAE application is described in Installing a library:

The easiest way to manage this is with a ./lib directory:

  1. Use pip to install the library and the vendor module to enable importing packages from the third-party library directory.

  2. Create a directory named lib in your application root directory:

    mkdir lib
  3. To tell your app how to find libraries in this directory, create or modify a file named in the root of your project, then add these lines:

    from google.appengine.ext import vendor
    # Add any libraries installed in the "lib" folder.
  4. Use pip with the -t lib flag to install libraries in this directory:

    pip install -t lib gcloud


  • When going through the mentioned doc page pay attention as it also contains instructions for requesting and using GAE-provided built-in libraries - different than those for installed/vendored-in libraries.

  • if your app is a multi-module one you'll need an for each module using the library at step#3, located beside the module's .yaml file. It can be symlinked for DRY reasons if you prefer (see

  • step #4's goal is to just bring the content of the stripe library in a subdirectory of the lib dir. You can do that manually if the pip way fails for whatever reason.