0

i am trying to deploy my python script on google cloud platform but when i run it on google cloud it keeps on giving me errors like no module found named 'requests' or some other modules as well, so how do i run these module on google cloud.

here are the list of modules that i am using:

from flask import Flask, render_template, request, redirect
from datetime import datetime
from tqdm import tqdm
import ctypes
import requests
import re
import os
import easygui

and here is the error that i am getting on google cloud platform:

ModuleNotFoundError: No module named 'requests'
at <module> (/app/app.py:5)
at _call_with_frames_removed (<frozen importlib._bootstrap>:219)
at exec_module (<frozen importlib._bootstrap_external>:783)
at _load_unlocked (<frozen importlib._bootstrap>:671)
at _find_and_load_unlocked (<frozen importlib._bootstrap>:975)
at _find_and_load (<frozen importlib._bootstrap>:991)
at _gcd_import (<frozen importlib._bootstrap>:1014)
at import_module (/usr/local/lib/python3.8/importlib/__init__.py:127)
at import_app (/usr/local/lib/python3.8/site-packages/gunicorn/util.py:358)
at load_wsgiapp (/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py:39)
at load (/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py:49)
at wsgi (/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py:67)
at load_wsgi (/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py:144)
at init_process (/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py:119)
at init_process (/usr/local/lib/python3.8/site-packages/gunicorn/workers/gthread.py:92)
at spawn_worker (/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py:583)

Please Help

3
  • Can you clarify question? Are you using Google App Engine? Also you need to show your requirements.txt file? Commented Aug 19, 2020 at 6:46
  • @nurgasemetey no i am not using google app engine, i have a web app which is written in python script and i want to upload it on google cloud for hosting, but when i deployed the app.py file its showing me errors so i think i need to install python liberaries on google cloud as well just like i did it on my pc Commented Aug 19, 2020 at 6:53
  • 1
    What product are you using in Google Cloud? Commented Aug 19, 2020 at 7:51

1 Answer 1

1

The same way you get it to work on your PC. You install the python modules that are missing. Check out google cloud's help section on how to do that at installing-python-dependencies.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.