I'm trying to my app.py file on azure. The files runs locally fine but when I deploy this app on azure with all libraries in requirements.txt. it gives me this error.
from flask_socketio import SocketIO, emit 2024-03-26T19:36:49.794996719Z: [ERROR] ModuleNotFoundError: No module named 'flask_socketio
While flask_socketio already present in requirements.txt. How i can solve it?
I checked the requirements.txt and the package is present there, but it still causing an error that it is not found. How i can solve it.
I tried deploying a Flask application with Flask-SocketIO without any issues
To avoid the above error make sure to install flask_socketio.
You can install it by using pip:
make sure to enable virtual environment for deployment purpose.
Index.html:
app.py:
requirements.txt:
Here's the local output:
For deployment,
Select the Azure logo on the taskbar in Visual Studio Code to open the Azure window.
Here are the steps:
1.Select your Azure subscription.
2.Then, select your created web app
3.Right-click on the web app
Here's the output after deployment: