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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -