Missing py2exe module

my py2exe installation file. I have a module that I put together, it is in the project / lib / execution _timer.py (c)

I need to include this file in my assembly. no matter what i tried, it cannot find this module. if I manually copy the file to the distribution, it works fine. but how can I automatically enable this.

from distutils.core import setup
import py2exe

setup(
    console=['file.py'],
    zipfile=None,
    options={
            "py2exe":{
                    'includes': 'execution_timer'
            }    
    }
)
+4
source share
2 answers

I would suggest:

  • specify the module extension you want to enable
  • make sure this error is not caused by relative imports . It may also be sufficient to indicate the path if the extension of the module is not enough [/ li>
0
source

:    distutils.core   import py2exe

setup(
    console=['file.py'],
    zipfile=None,
    packages=['lib'],
    package_dir={'lib':'lib'},   
    }
)
0

Source: https://habr.com/ru/post/1547065/


All Articles