3rd Party Libraries and Py2exe

后端 未结 1 1264
南旧
南旧 2021-01-25 17:30

How would I go about bundling, say, Beautiful soup into an exe along with my code using py2exe?

The code I am using for my setup.py right now is

from di         


        
相关标签:
1条回答
  • 2021-01-25 17:52

    In your options you can add an attribute includes and add the libraries that way. An example:

    options = { "py2exe": {
                    "includes": ["LIBRARY HERE", ...]
              }}
    

    This includes external libraries that haven't already been found by Py2exe. If I remember correctly, Py2exe should try to find the dependencies on it's own and any it doesn't find you can use the above method.

    I'm not sure about the library structure for Beautiful Soup as I've not used it, but an example would be:

    "includes": ["matplotlib.backends.backend_tkagg"]

    0 讨论(0)
提交回复
热议问题