I was at this all day and found a workaround, it’s sneaky but it works. In the error message I was receiving I noticed that there was a space between in library .zip. I could not trace it down in the source code for py2exe or selenium. I too had tried putting the xpi file in the library zip and it did not work. The workaround is:
-
In your setup file use these options:
setup( console=['yourFile.py'], options={ "py2exe":{ "skip_archive": True, "unbuffered": True, "optimize": 2 } } )
-
Run the py2exe install
- Copy the xpi file into the dist directory
That should do it.