python - unable to include module in py2exe setup script (python3) -


i'm trying create exe of script wrote, i'm unable include package need, package hurry.filesize, ever run setup.py error "importerror: hurry", it's escaping dot , not reading whole word, i've tried 'hurry\.filesize' , many other combinations , doesn't read whole name.

here setup script:

from distutils.core import setup import py2exe, sys, os  sys.argv.append('py2exe')  data_files = [] files in os.listdir('./img/'):     f1 = './img/' + files     if os.path.isfile(f1):  # skip directories         f2 = 'img', [f1]         data_files.append(f2)  setup(windows=[{'script': 'artifactory_spider.py', 'icon_resources': [(0, './img\\tachk.ico')]}],       data_files=data_files,       options={'py2exe': {'includes': ['patoolib', 'hurry.filesize'], 'bundle_files': 2, 'compressed': true, 'dist_dir': './artifactory spider'}},       zipfile=none,) 

this bit late in coming, hit same problem.

the solution - worked me - create empty __init__.py file in hurry folder.

e.g. c:\python34\lib\site-packages\hurry\__init__.py

then cxfreeze include hurry.filesize module.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -