Creating cx_Freeze exe with Numpy for Python

前端 未结 3 548
北海茫月
北海茫月 2020-11-28 14:03

Im trying to create a basic exe using cx_Freeze. It works for .py programs that don\'t have numpy but I can\'t get one made correctly with numpy.

*Any ideas on ho

3条回答
  •  无人及你
    2020-11-28 14:29

    This is a bug in cx_Freeze - it doesn't automatically detect that it should copy the module numpy.lib.format. It's already fixed in the development version, so if you're in a position to try that, it should work.

    Otherwise, you'll need to specify that numpy.lib.format needs to be included in your setup.py. The line will look something like this:

    options = {"build_exe": {"packages": ["numpy.lib.format"]}},
    

    See also the documentation.

提交回复
热议问题