I am on Mac OS and developing for google cloud platform.
I have created vitualenv - virtualenv xyz
.
I activated using - source xyz/bin/activate
Then, I installed the pkg I needed - pip install python-dateutil
When I do pip list
, I do see the python-dateutil
is there
But when i run my service using dev_appserver.py .
and try to make a post request. I get the ImportError: No module named dateutil.parser
Questions: In my appengine_config.py
, I have vendor.add('lib')
but the packages are installed under my_project-> xyz -> lib -> python2.7 -> site-packages -> dateutil
. How does my app knows where to look for packages?
Second question: When I am ready to deploy to production, how do I deploy the packages. pip freeze > requirements.txt
. Is that enough for prod server to know what packages to use. Do I need lib
folder under my_project? I am confused about how packages get referred in virtualenv and in production.