Error 13 after packed with pyinstaller
See original GitHub issueHi,
I recently wrote a program with PyQt5 which uses keyboard
module. The program run well as .py
with sudo
, before packing as .app
file with pyinstaller
. After packing, the console shows that I’m not running the .app
as administrator. But, the error shows even I run with sudo
.
I submit new issue on the pyinstaller
. It’s been a month that I posted. Then I tried to include the keyboard
into source code instead of importing as a installed third-party module. But the problem remains. So I’m guessing that maybe there’s something to do with the module itself.
To reproduce the problem, see the issue I wrote on the pyinstaller
project.
Let me know if you need more information.
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
PyArmour/Pyinstaller - PermissionError: [Errno 13] #5913
When I attempt pyarmor pack --clean -e "--onefile " \SharedDrive\Data\file.py. I receive this error PermissionError: [Errno 13] Permission denied: ...
Read more >Pyinstaller Error "failed to execute script " When App Clicked ...
I got the main.exe inside dist folder. I double clicked on this file, and I raised the error mentioned above. To fix this,...
Read more >Pyinstaller: Module not found when running .exe when ...
The program tries to write a Pandas dataframe. This works find in PyCharm, but when I produce a Windows exe using PyInstaller it...
Read more >Changelog for PyInstaller — PyInstaller 5.7.0 documentation
Add the package's location and exact interpreter path to the error message for the check for obsolete and PyInstaller-incompatible standard ...
Read more >When Things Go Wrong — PyArmor 7.6.0 documentation
As obfuscating the script by pyarmor , check not only the last error message, ... If you are using command pack, make sure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re not using the key listener, you can safely ignore the error: it should have no impact on running your program.
I am not sure about the steps needed to run a
pyinstaller
build as sudo. There are some ideas on this StackOverflow thread, but I haven’t tried any of them myself.It might be a good idea to see if
keyboard
can be refactored to only launch the root-level thread if the listener is being activated, rather than by default; this will eliminate those extra errors. In addition, it looks like the root privilege escalation must happen after the program is loaded: if so, the thread really shouldn’t be launched until that escalation has had a chance to happen anyways.@glitchassassin As I mentioned in the issue that I reported on pyinstaller project, I have run the project as root, but it still got no permission to bind the hotkey. Or maybe I should run
getuid()
or some function else to check if I’m running the program as sudoer or not even I run with sudo? I’ll check that later.