Forums

No module name flask

I have uploaded all my files to the files tab from github. created a virtualenv with all the requirements in it, and I have given the correct locations for both the virtualenv as well as the source code. But when I run my app, I get the following errors:

2023-08-27 10:53:53,971: Error running WSGI application 2023-08-27 10:53:53,973: ModuleNotFoundError: No module named 'flask' 2023-08-27 10:53:53,973: File "/var/www/maheedhar_pythonanywhere_com_wsgi.py", line 82, in <module> 2023-08-27 10:53:53,973: from app import app as application # noqa 2023-08-27 10:53:53,973: 2023-08-27 10:53:53,973: File "/home/Maheedhar/FYP-flask-app/backend/app.py", line 1, in <module> 2023-08-27 10:53:53,973: from flask import Flask,jsonify 2023-08-27 10:53:53,973: ******* 2023-08-27 10:53:53,973: If you're seeing an import error and don't know why, 2023-08-27 10:53:53,973: we have a dedicated help page to help you debug: 2023-08-27 10:53:53,973: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2023-08-27 10:53:53,973: ******* 2023-08-27 10:53:56,533: Error running WSGI application 2023-08-27 10:53:56,533: ModuleNotFoundError: No module named 'flask' 2023-08-27 10:53:56,533: File "/var/www/maheedhar_pythonanywhere_com_wsgi.py", line 82, in <module> 2023-08-27 10:53:56,533: from app import app as application # noqa 2023-08-27 10:53:56,533: 2023-08-27 10:53:56,533: File "/home/Maheedhar/FYP-flask-app/backend/app.py", line 1, in <module> 2023-08-27 10:53:56,533: from flask import Flask,jsonify 2023-08-27 10:53:56,533: ******* 2023-08-27 10:53:56,533: If you're seeing an import error and don't know why, 2023-08-27 10:53:56,534: we have a dedicated help page to help you debug: 2023-08-27 10:53:56,534: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2023-08-27 10:53:56,534: ******* 2023-08-27 10:53:57,086: Error running WSGI application 2023-08-27 10:53:57,086: ModuleNotFoundError: No module named 'flask' 2023-08-27 10:53:57,086: File "/var/www/maheedhar_pythonanywhere_com_wsgi.py", line 82, in <module> 2023-08-27 10:53:57,087: from app import app as application # noqa 2023-08-27 10:53:57,087: 2023-08-27 10:53:57,087: File "/home/Maheedhar/FYP-flask-app/backend/app.py", line 1, in <module> 2023-08-27 10:53:57,087: from flask import Flask,jsonify

Even though my virtualenv says it has flask version 2.3.3 installed, I still get this error in the error log. Can somebody say a fix for this

Is your webapp configured to use virtual environment on the "Web" page in "Virtualenv:" section?