PermissionError: [Errno 13] Permission denied Flask.run() PermissionError: [Errno 13] Permission denied Flask.run() flask flask

PermissionError: [Errno 13] Permission denied Flask.run()


You're trying to run the app on a privileged port (81) - if you use a higher port such as 5000 you won't need sudo privileges.


The "permission denied" error is occurring on the bind call; this has nothing to do with directory permissions.

You're attempting to bind to port 81 (an odd choice), which is a privileged port (one that is less than 1024). This means you need to run it as root.


go to c:\python27\ directory and rigtlcick python.exe and tab to compaitbility and select the admin privilege option and apply the changes. Now you issue the command it allows to create the socket connection.after that run script using python