简体   繁体   中英

TypeError: __init__() missing 1 required positional argument: 'constantsModule' : simple hello world script fails with error

Using cxfreeze to create a exe file with a simple script named

'test.py'

which prints

print( 'Hello World' )

Running cxfreeze falls with error. I have kept test.py in the location from which I am running cxfreeze.

在此处输入图像描述

This error occurs if you are using Cx-freeze version 6.1, you can go back to 6.0 or go ahead:

pip install -U git+ https://github.com/anthony-tuininga/cx_Freeze.git@master

Here you can see the issue:

https://github.com/anthony-tuininga/cx_Freeze/issues/560

and this:

https://github.com/anthony-tuininga/cx_Freeze/pull/561

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM