[Chennaipy] [kanchilug] Re: flask error: ModuleNotFoundError: No module named 'flask.ext'
Dhanasekar
tkdhanasekar at gmail.com
Mon Sep 12 01:38:31 EDT 2022
> Try installing
> pip install flask_routing flask_cors
>
*# pip3 install flask_routing flask_cors *
requirement already satisfied
Edit the lines in app.py
> #from flask.ext.routing import router
> #from flask.ext.cors import CORS
> from flask_routing import router
> from flask_cors import CORS
>
edited the app.py file with above parameters
it throws views module not found
and it is also installed
*# pip3 install views*
*# flask run --host=0.0.0.0*
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.
Error: While importing 'flask_application.app', an ImportError was raised:
Traceback (most recent call last):
File
"/root/flask_application/venv/lib/python3.10/site-packages/flask/cli.py",
line 218, in locate_app
__import__(module_name)
File "/root/flask_application/app.py", line 17, in <module>
from views import endpoints
*ImportError: cannot import name 'endpoints' from 'views'
(/root/flask_application/venv/lib/python3.10/site-packages/views.py)*
*# pip3 freeze*
aniso8601==9.0.1
click==8.1.3
datatypes==0.2.6
decorators==2.0.7
endpoints==5.0.1
Flask==2.2.2
Flask-Cors==3.0.10
Flask-Ext==0.1
Flask-RESTful==0.3.9
Flask-Routing==0.0.21
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
pytz==2022.2.1
six==1.16.0
views==0.3
Werkzeug==2.2.2
all the dependencies are installed still
ImportError exists , any clues
thanks for your time on this
regards,
Dhanasekar T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20220912/8a71b7db/attachment.html>
More information about the Chennaipy
mailing list