类型错误。__init__()缺少1个必要的位置参数:'constantsModule':简单的hello world脚本失败,出现错误。

问题描述 投票:0回答:1

使用cxfreeze创建一个带有简单脚本的exe文件,该脚本名为

'test.py'

其中打印

print( 'Hello World' )

运行cxfreeze时出现错误。我把test.py保存在运行cxfreeze的位置。

enter image description here

python python-3.x cx-freeze
1个回答
1
投票

如果你使用的是 6.1 版本的 Cx-freeze,就会出现这个错误,你可以回到 6.0 或者继续。

pip install -U git+https:/github.comanthony-tuiningacx_Freeze.git@master。

在这里你可以看到这个问题。

https:/github.comanthony-tuiningacx_Freezeissues560。

和这个。

https:/github.comanthony-tuiningacx_Freezepull561。

© www.soinside.com 2019 - 2024. All rights reserved.