简体   繁体   中英

Packaging using py2exe with extra modules

I am trying to create an .exe file from a python script using py2exe. Whenever I try running the program, it seems that it is missing a module (pyping).

I have tried:

from distutils.core import setup
import py2exe
setup(windows=[{"script": "main.py"}], 
      options={"py2exe": {"includes": ["pyping"]}})

and:

python setup.py py2exe --includes pyping

But py2exe always returns "No module named pyping"?

zip2exe FAQ has a section about dealing with "No module named ..." which links you to exe with eggs which suggests the issue is that pyping is installed as an egg instead of unzipped. The first solution is to manually install it unzipped with easy_install --always-unzip . The second is to include the actual package in your source folder.

Here is another question discussing other alternatives like cx_Freeze :

python cx_Freeze egg problem

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