PermissionError: [Errno 13] Permission denied: ‘C:\\pdf2word.spec‘

PyCharm-Terminal, package the exe with pyinstalll, the command is as follows:

pyinstaller -F -w pdf2word.py

The error is as follows:

PermissionError: [Errno 13] Permission denied: 'C:\\pdf2word.spec'

The error interface is shown in the figure below:
Insert picture description here
Solution:
Check the online information, and some people say that you exit 360, but it doesn't work.

1. The right mouse button-win-start-Windows PowerShell (Administrator) (A), after several tossings, and then specify PyCharm and the path of the .py file to be compiled, and run successfully. As shown in the figure below:
Insert picture description here
During the period, the problem of not being able to find the command pyinstaller was also solved. Solve it according to the following prompts given by the system.

Suggestion [3,General]: The command pyinstaller could not be found, but it does exist in the current location. By default, Windows PowerShell does not load commands from the current location. If you trust this command, type ".\pyinstaller" instead. For more information, see "get-help about_Command_Precedence".
Suggestion [3,General]: The command pyinstaller could not be found, but it does exist in the current location.  By default, Windows PowerShell does not load commands from the current location.  If you trust this command, type ".\pyinstaller" instead.  For more information, see "get-help about_Command_Precedence".

2. Inspired by this, in the PyCharm-Terminal command window, using the above method (that is, specifying the command and the path of the file to be compiled) also compile successfully. As shown below:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/114110191