且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

尝试使用 PyInstaller 时出现权限错误

更新时间:2022-11-15 11:34:04

诀窍是在你正在构建的目录之外创建一个新目录,然后像代码中一样将构建引用作为 Kivy 应用程序的 main.py以下.这修复了权限错误,即使来自常规 C​​MD.

Trick is to make a new directory outside of the one you are building, and then make the build reference the main.py of the Kivy app like in the code below. This fixes permission errors, even from a regular CMD.

PS C:Users	heguyDocumentsPythonmyapp-build> python -m PyInstaller --name "MyApp" "C:Users	heguyDocumentsPythonmyappmain.py"