Skip to content
Advertisement

Python .exe PermissionError: [Errno 13] Permission denied

Here’s the code for my reprex:

JavaScript

From this, I used auto-py-to-exe to build a one-directory .exe. Then I opened cmd as an administrator, navigated to the .exe’s folder and attempted to run the executable. Here’s the output:

JavaScript

I am all out of ideas at this point, and I’d appreciate any thoughts.

Advertisement

Answer

I solved the issue. My antivirus was blocking file creation.

Additionally, I’d suggest sticking with python’s standard syntax regarding files.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement