Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.9K
Vistas
Running Flask on Windows doesn't execute flask run command

I needed to setup flask for windows, so i wrote the following codes in cmd

set FLASK_APP=application.py
set FLASK_DEBUG=1
set DATABASE_URL='postgres.......' =>(the credential given by the Heroku account)
flask run

But when i hit enter on the flask run, I get an error that says -

flask is not recognized as an internal or external command, operable program or batch file

Why is this not working? I've been trying to work on it but i'm still having the same error message. What could be the issue?

over 4 years ago · Santiago Trujillo
9 Respuestas
Responde la pregunta

0

Just install flask on the current directory if you are working in another directory where the flask is not installed.

Install flask: pip install flask

over 4 years ago · Santiago Trujillo Denunciar

0

install flask: pip install flask in the working directory where application.py file is located.

over 4 years ago · Santiago Trujillo Denunciar

0

I faced the same issue. Perhaps you missed the message you received while installing 'flask'. While running pip install flask I received

WARNING: The script flask.exe is installed in 'C:\Users\ankur.kulshrestha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Either set the path in your PATH env variable or use the complete path while running flask run.

over 4 years ago · Santiago Trujillo Denunciar

0

I had this same issue and resolved it by running this in CMD, where the path is set to your Python scripts folder:

set PATH=C:\Users\YOUR_USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts

The error is related to the "WARNING" that may be shown when running 'pip install flask'. You can also confirm whether you installed flask successfully by using 'pip show flask'.

over 4 years ago · Santiago Trujillo Denunciar

0

Try using:

python -m flask run 

Also make sure you are in the same directory as application.py

over 4 years ago · Santiago Trujillo Denunciar

0

uninstall flask using the following command

pip uninstall flask

close cmd and open cmd as Administrator now run

pip install flask

check:

flask --version
over 4 years ago · Santiago Trujillo Denunciar

0

If you have Anaconda, use python -m flask run from Anaconda Prompt when you are on the folder of the script app.py.

over 4 years ago · Santiago Trujillo Denunciar

0

Make sure you've saved the application.py and the app variable exists.

then run python -m flask run ,

over 4 years ago · Santiago Trujillo Denunciar

0

Error: Could not import 'application'. how is it saved?

about 4 years ago · Paula Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda