Wednesday, 15 June 2011

python - compile tkinter to executable using py2exe, having issue with xlrd -



python - compile tkinter to executable using py2exe, having issue with xlrd -

i made gui using tkinter. gui linked excel file used xlrd package. after compiling gui executable using py2exe, when seek open executable file text file next error message:

traceback (most recent phone call last): file "main.py", line 2, in <module> file "xlrd\__init__.pyc", line 4, in <module> ioerror: [errno 2] no such file or directory: 'c:\\users\\dist\\library.zip\\xlrd\\version.txt'

i have no thought "version.txt" file or why doesn't exist in directory. have tried compile executable gui doesn't need xlrd bundle , worked fine. setup.py file script:

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

i'm new python , making executable applications. advice appreciated.

the version of xlrd using out of date; version.txt has been eradicated.

try first 1 of next versions meets requirements:

0.9.0 -- xls , xlsx files, python 2.6. 2.7, 3.2+ 0.8.0 -- xls , xlsx files, python 2.3 2.7 0.7.9 -- xls files only, python 2.1 2.7

note: released 0.9.0 not production quality; several bugs have been fixed in master branch zip file github using link above, not tar.gz pypi.

python tkinter py2exe xlrd

No comments:

Post a Comment