0

I realize there are scores of questions around this and I have been through many of them without solving my issue.

Working off of my macbook pro, in pycharm, building a super basic flask app for google app engine, I keep getting the traceback "ImportError: No module named psycopg2" despite having everything in what I believe is order.

Here is link to my really rough main.py file (just started learning flask, etc.) - link to Gist

Steps: 1. When I started building my app, i had a \Lib folder in the app directory where i specifically installed ran

pip install -r requirements.txt -t lib

Included:

  • Flask==0.12.2
  • Flask-SQLAlchemy==2.2
  • gunicorn==19.7.1
  • psycopg2==2.7.1

Installed without issue and I can see \lib appropriately populated.

Still getting error, so i tried the following:

  1. Setting up a virtualenv in my app director from terminal:

    virtualenv env source env/bin/activate pip install -r requirements.txt

Installs nicely into the \env sub-dir. Still when i run the app locally (and when deployed - although there could be other issues) - I get the following: pycharm terminal view

The reason i am struggling is that it seems to be installed without issue!

EDIT: Link - Using Google Cloud SQL Postgres Quickstart (where my data is and documentation i was following)

theStud54
  • 550
  • 1
  • 5
  • 16

0 Answers0