How to package Twisted program with py2exe?

前端 未结 2 1109
我在风中等你
我在风中等你 2020-12-15 10:34

I tried to package a Twisted program with py2exe, but once I run the exe file I built, I got a \"No module named resource\" error.

And I found the py2exe said:

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 11:14

    Had same issue with email module. I got it working by explicitly including modules in setup.py:

    OLD setup.py:

    setup(console = ['main.py'])
    

    New setup.py:

    setup(console = ['main.py'], 
          options={"py2exe":{"includes":["email.mime.multipart","email.mime.text"]}})
    

提交回复
热议问题