Skip to content Skip to sidebar Skip to footer

How To Disable Cx_freeze To Autodetect All Modules

cx_freeze build includes all modules, that installed on my machine, so freezed build becomes a huge. How to disable autodetection feature? I just want to build small PyQt applicati

Solution 1:

It was quite simple. This application uses a custom modules, so I've added application folder to the path:

path = sys.path + ["app"]

The trick is that app uses module "utils" and I have other "utils" module in my OS path. Other "utils" module imports a lot of stuff like matplotlib, PIL, etc. So I've solved problem by changing path environment like this:

path = ["app"] + sys.path

So, cx_freeze gets right modules when freeze executable.

Post a Comment for "How To Disable Cx_freeze To Autodetect All Modules"