Reputation: 100
I have a django project using python 2.7 and want to deploy it on Google App Engine(GAE).
I followed all this link for the tutorial: https://cloud.google.com/python/django/appengine
When I finished deploying, and go to my project URL, I got an error and when I look on the Error Reporting in Google Cloud Platform It says "ImportError: No module named googleads", but I already installed it on my local before I uploaded it.
pip freeze:
asn1crypto==0.24.0
astroid==1.6.1
autopep8==1.3.4
backports.functools-lru-cache==1.5
cffi==1.11.5
colorama==0.3.9
configparser==3.5.0
cryptography==2.1.4
Django==1.11.11
enum34==1.1.6
futures==3.2.0
googleads==10.1.0
httplib2==0.10.3
idna==2.6
ipaddress==1.0.19
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
MySQL-python==1.2.5
mysqlclient==1.3.4
oauth2client==4.1.2
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycodestyle==2.3.1
pycparser==2.18
pylint==1.8.2
PyMySQL==0.8.0
pyOpenSSL==17.5.0
PySocks==1.6.8
pytz==2018.3
PyYAML==3.12
rsa==3.4.2
singledispatch==3.4.0.3
six==1.11.0
suds-jurko==0.6
virtualenv==15.1.0
win-inet-pton==1.0.1
wrapt==1.10.11
xmltodict==0.11.0
Please help!
Thanks!
Upvotes: 1
Views: 3558
Reputation: 39834
Note the -t lib
difference between the 2 pip
invocations in step 2 of the Run the app on your local computer section:
pip install -r requirements-vendor.txt -t lib/ pip install -r requirements.txt
The first one installs the runtime dependencies for your app - inside your app (see Copying a third-party library). The 2nd one installs dependencies needed for the local development server - in your venv (or local system).
Having app dependencies installed in your venv or local system (which is what your pip freeze
shows) doesn't help - that's not where the sandbox is looking at for your app's dependencies.
So check that the googleads
package is in your equivalent of the requirements-vendor.txt
file and that those packages are installed in your app's lib
directory.
Upvotes: 0