I went to the Educational Section of Awsome Django and selected to work on the second link- LearnDjango - Tutorials and premium courses on Django and Django REST Framework. I decided to start learning from the very beginning, the first tutorial- Flask vs Django in 2024: A Comprehensive Comparison of Python Web Frameworks. To follow along I created a directory “learndjango1” to hold all my work from the LearnDjango tutorials. I then created another directory “Flask” inside the learndjango1 folder
I think I followed the tutorial instructions up to where I am to run the ‘flask run’ command. When I run the ''flask run
command I get the following error
(.venv) C:\Users\hp\Documents\Learn Python\Django\LearnDjango1\Flask>python -m pip install flask
'.python' is not recognized as an internal or external command,
operable program or batch file.
(.venv) C:\Users\hp\Documents\Learn Python\Django\LearnDjango1\Flaskpython -m pip install flask
Collecting flask
Using cached flask-3.0.3-py3-none-any.whl.metadata (3.2 kB)
Collecting Werkzeug>=3.0.0 (from flask)
Using cached werkzeug-3.0.4-py3-none-any.whl.metadata (3.7 kB)
Collecting Jinja2>=3.1.2 (from flask)
Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting itsdangerous>=2.1.2 (from flask)
Using cached itsdangerous-2.2.0-py3-none-any.whl.metadata (1.9 kB)Collecting click>=8.1.3 (from flask)
Using cached blinker-1.8.2-py3-none-any.whl (9tadata (3.0 kB).5 kB)
Using cached click-8.1.7-py3-none-any.whl (97 metadata (1.6 kB)
kB)
Using cached itsdangerous-2.2.0-py3-none-any.w.whl.metadata (17 kB)hl (16 kB) ->flask)
Using cached jinja2-3.1.4-py3-none-any.whl (13n_amd64.whl.metadata (3 kB)
Using cached werkzeug-3.0.4-py3-none-any.whl ( kB)227 kB) .5 kB)
Using cached MarkupSafe-3.0.1-cp312-cp312-win_amd64.whl (15 kB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Installing collected packages: MarkupSafe, itsdangerous, colorama, blinker, Werkzeug, Jinja2, click, flask
Successfully installed Jinja2-3.1.4 MarkupSafe-3.0.1 Werkzeug-3.0.4
blinker-1.8.2 click-8.1.7 colorama-0.4.6 flask-3.0.3 itsdangerous-2.2.0
(.venv) C:\Users\hp\Documents\Learn Python\Django\LearnDjango1\Flask>flask run
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py'
file in the current directory.
(.venv) C:\Users\hp\Documents\Learn Python\Django\LearnDjango1\Flask>flask run debug mode: off
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.
Error: Got unexpected extra arguments (debug mode: off)