blog darkness...

words, music, food

py2exe IOError: [Errno 2] No such file or directory: 'something\something\VERSION'

Seems like this is a problem with a few different libraries using py2exe.  The issue seems to be that py2exe wants only python files in, so if a module tries to read from another file (like a text file with a version string, as savReaderWriter does), that file won't be there.

  File "savReaderWriter\__init__.pyc", line 56, in <module>
IOError: [Errno 2] No such file or directory: 'Z:\\DL\\compare_coders\\dist\\\\savReaderWriter\\VERSION'
The solution is pretty simple. Unsurprisingly, on line 56 of in the savReaderWriter package, there is a line that opens that version file and reads the version string. Just comment out the read call, replace it with the version string you find in the text file and re-run py2exe setup.
blog comments powered by Disqus