I've successfully ran my app using Webapp2 on local server. Now I wish to deploy this on Google App Engine. I'm currently debugging some errors since libraries are not compatible.
To configure the app, I followed the Google guide to add 3rd party plugins e.g. added lib
folder and:
# appengine_config.py
from google.appengine.ext import vendor
# Add any libraries install in the "lib" folder.
vendor.add('lib')
In the lib
folder, I installed my requirements using pip install -t lib -r requirements.txt
which is
google-cloud-bigquery
oauth2client==4.1.2
google-api-python-client==1.6.4
pandas-gbq
pandas
scipy
scikit-learn==0.18.2
numpy==1.9.0
When I deploy my app, I see:
Traceback (most recent call last): File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler handler, path, err = LoadObject(self._handler) File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject obj = import(path[0]) File "/base/data/home/apps/s~corded-epigram-579/gr:20171215t102242.406232341485344902/main.py", line 17, in import pandas as pd File "/base/data/home/apps/s~corded-epigram-579/gr:20171215t102242.406232341485344902/lib/pandas/init.py", line 19, in "Missing required dependencies {0}".format(missing_dependencies)) ImportError: Missing required dependencies ['numpy']
which basically tells me that it can't find numpy, but it is there in the lib
folder.
I know that google supports numpy v1.6.1 which I can add using app.yaml
file, but I need at least 1.9.0 for the pandas
package.
Also added a screenshot of my main.py imports which I need to run the code.