Ich hab ein Python2 Programm nach Python3 migriert, das primaer unter Windows laufen soll. Damit die Anwender kein Python installeren muessen (was die ueberfordern wuerde) hab ich es mit pyinstallier in ein Executable compilert.
Starte ich mein Programm direkt mit Python, funktioniert alles, starte ich dagegen das Executable (Doppel-Klick auf icon) bricht es mit dieser Fehlermeldung ab: When I compile it with pyinstaller and start the executable via desktop-click, it throws an exception: Traceback (most recent call last): File "\\VBOXSRV\python\W10\fexit_20250325_1641.py", line 3468, in <module> wexit(main()) File "\\VBOXSRV\python\W10\fexit_20250325_1641.py", line 281, in main menu() File "\\VBOXSRV\python\W10\fexit_20250325_1641.py", line 376, in menu cls() File "\\VBOXSRV\python\W10\fexit_20250325_1641.py", line 3366, in cls syscall('cls') File "\\VBOXSRV\python\W10\fexit_20250325_1641.py", line 3373, in syscall subprocess.call(cmd) File "subprocess.py", line 345, in call File "subprocess.py", line 966, in __init__ File "subprocess.py", line 1435, in _execute_child OSError: [WinError 740] The requested operation requires elevation Welche/warum "elevation"? Die problamtische Funktion ist: def syscall(*cmd): cmd = ['cmd','/d','/c']+list(cmd) subprocess.call(cmd) Interessant ist: starte ich das Executable aus einem cmd.exe oder cygwin/bash Window heraus laeuft es ohne Fehlermeldung bzw Abbruch. Also eine seltsame Inkompatibilitaet von pyinstaller mit Windows? Ich verwende Windows 10 mit: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/ _______________________________________________ python-de Mailingliste -- python-de@python.org Zur Abmeldung von dieser Mailingliste senden Sie eine Nachricht an python-de-le...@python.org https://mail.python.org/mailman3/lists/python-de.python.org/ Mitgliedsadresse: arch...@mail-archive.com