gpt4 book ai didi

python - Nuitka 与 PySimpleGUI 不兼容 : `CALL_FUNCTION_WITH_ARGS14' error

转载 作者:行者123 更新时间:2023-12-05 04:27:50 34 4
gpt4 key购买 nike

我尝试在 Windows 上使用 Nuitka 制作一个 EXE,但总是出现这样的错误:CALL_FUNCTION_WITH_ARGS14

我用谷歌搜索了“CALL_FUNCTION_WITH_ARGS14”,但没有显示任何内容。有没有人有类似的问题?

我正在使用 Python 3.9 和 3.10,这是我的命令

nuitka --standalone --onefile --mingw64 --show-memory --show-progress --follow-imports --output-dir=out Demo_Hello_World.py

Demo_Hello_World.py 来自 PySimpleGUI/DemoPrograms/Demo_Hello_World.py

     ValueTraceLoopComplete 38798 30843 7955
ValueTraceLoopIncomplete 16811 14635 2176
ValueTraceMerge 470835 399699 71136
ValueTraceUninitialized 82073 66112 15961
ValueTraceUnknown 238500 209701 28799
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: Backend linking program with 14 modules (no progress information available).
module.PySimpleGUI.PySimpleGUI.c: In function 'impl_PySimpleGUI$PySimpleGUI$$$function__578__github_issue_post_make_markdown':
module.PySimpleGUI.PySimpleGUI.c:549680:35: warning: implicit declaration of function 'CALL_FUNCTION_WITH_ARGS14'; did you mean 'CALL_FUNCTION_WITH_ARGS10'? [-Wimplicit-function-declaration]
549680 | tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS14(unicode_builtin_format, args);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| CALL_FUNCTION_WITH_ARGS10
module.PySimpleGUI.PySimpleGUI.c:549680:33: warning: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
549680 | tmp_assign_source_2 = CALL_FUNCTION_WITH_ARGS14(unicode_builtin_format, args);
| ^

Nuitka-Scons:INFO: Running 'C:\\Users\\nytrg\\AppData\\Local\\Nuitka\\Nuitka\\gcc\\x86_64\\11.3.0-14.0.3-10.0.0-msvcrt-r3\\mingw64\\bin\\gcc.exe -o "F:\\PySimpleGUI\\DemoPrograms\\out\\Demo_Hello_World.dist\\Demo_Hello_World.exe" -fuse-linker-plugin -flto=6 -fpartial-inlining -freorder-functions -Wl,--exclude-all-symbols -Wl,--out-implib,.\\import.lib -municode -O3 -s -Wl,--enable-auto-import -Wl,--stack,9863168 -static-libgcc @".\\@link_input.txt" -LC:\\Users\\nytrg\\AppData\\Local\\Programs\\Python\\Python39\\libs -lm -lpython39' took 164.76 seconds
c:/users/nytrg/appdata/local/nuitka/nuitka/gcc/x86_64/11.3.0-14.0.3-10.0.0-msvcrt-r3/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\nytrg\AppData\Local\Temp\cccIcn6f.ltrans80.ltrans.o:<artificial>:(.text+0x32b8): undefined reference to `CALL_FUNCTION_WITH_ARGS14'
collect2.exe: error: ld returned 1 exit status

scons: *** [F:\PySimpleGUI\DemoPrograms\out\Demo_Hello_World.dist\Demo_Hello_World.exe] Error 1

最佳答案

我遇到了同样的问题,唯一帮助我的是在一个干净的 Python venv 中编译,这个问题可能是由于某些包冲突引起的,但需要进一步调查。

总结一下:

  1. 创建一个干净的venv
  2. 使用适当的脚本激活 venv(引用下表) Activate script table
  3. 通过 pip 安装必要的先决条件(当然包括 Nuitka)
  4. 再次尝试使用 nuitka 进行编译

关于python - Nuitka 与 PySimpleGUI 不兼容 : `CALL_FUNCTION_WITH_ARGS14' error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72766881/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com