Q: How to fix "[Errno 13] Permission Denied" on the created main.exe from PyInstaller? I am trying to package a project from PyCharm using PyInstaller and it gives the following:
Command: >pyinstaller --paths=C:\Users\user\PycharmProjects\project\venv\Lib\site-packages
C:\Users\user\PycharmProjects\project\main.py
PermissionError: [Errno 13] Permission denied: 'C:\Users\user\PycharmProjects\project_output_folder\build\main\main.exe'
Everything else seems to work until the end and the folders and subfolders all have write access.
EDIT From Comments:
I am on Windows 10. I check the file permissions but this error is happening on main.exe which is being created by PyInstaller. It doesn't successfully create itself during the process. The folder that it will reside in has write privileges.
The main.exe file does not exist though. It gives the permission error when trying to make it.

A: Try this using chmod. The chmod command allows you to change the permissions of a file or folder.
https://www.computerhope.com/unix/uchmod.htm
EDIT:
Make sure to put sudo before any command you are running to do it.
I will try to edit this answer later after testing on my computer
