2021年2月2日星期二

How to run the python webapp using flask & anaconda from vscode?

I have installed Anaconda-Package, Flask, Pip & Vscode. I am currently running the development project on localhost using "pipenv shell" command then "flask run" command in vscode.

It works well on http://127.0.0.1:5000/ for simple webapp. But I want to display the prediction charts & tables on a webpage using pandas, numpy etc.

So, When I try to import

import pandas as pd  import numpy as np  

It displays this ->

flask.cli.NoAppException  flask.cli.NoAppException: While importing "app", an ImportError was raised:    Traceback (most recent call last):    File "c:\users\mdev\.virtualenvs\flask_md_project-itylmdvv\lib\site-packages\flask\cli.py", line 240, in locate_app      __import__(module_name)    File "D:\flask_md_project\app.py", line 4, in <module>      import numpy as np  ModuleNotFoundError: No module named 'numpy'  

[above error as image][1] [1]: https://i.stack.imgur.com/JoeX0.png

How do I use pandas,numpy,matplotlib etc from anaconda package along with flask through vscode for my python webapp ? Please help 🙏

https://stackoverflow.com/questions/66021112/how-to-run-the-python-webapp-using-flask-anaconda-from-vscode February 03, 2021 at 12:05PM

没有评论:

发表评论