[FIXED] Program 'flask.exe' failed to run: Access is deniedAt line:1 char:1


i am learning flask from a course in udemy, i followed the steps by changing:

  1. run Pycharm as adminstrator (on Python 3.10 interpreter)
  2. changed main.py to hello.py
  3. put the code as shown in the picture and input the following; set FLASK_ etc. as shown in the picture at local terminal, i tried other solutions like $ and % flask run but it always give me Access is denied as shown. How do i proceed? really need your help as i searched and this is my last resort now..

the error code is:

Program 'flask.exe' failed to run: Access is denied

At line:1 char:1
 flask run

 CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
 FullyQualifiedErrorId : NativeCommandFailed


For some reason, the flask.exe shim created when installing flask is access-denied for you.

python -m flask does the same thing (in this case!), so you can use that as a substitute.

Answered By – AKX

Answer Checked By – Katrina (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published