Packaging Chromedriver for a stand-alone EXE

19 views
Skip to first unread message

Jason Crowe

unread,
Feb 25, 2020, 4:03:53 AM2/25/20
to PyInstaller
I would like to hire someone to create a .spec file for me. 

I create a lot of programs based on selenium. So far, I have delivered a pyinstaller exe and a Chromedriver.exe file in a single folder. In the script, the chromedriver file is called with "./chromedriver.exe". I would like to include the chromedriver file in the program exe, so the user only needs a single file.

Let me know your fee, and I'd be happy to send you money with paypal.

Thanks,
Jason

Jay Walker

unread,
Feb 25, 2020, 12:17:59 PM2/25/20
to pyins...@googlegroups.com
This is what I have in my spec file:

added_files = [
    ( 'myFiles/tests', 'myFiles/tests' )
]

a = Analysis(['main.py'],
             pathex=['/Users/me/Documents/MyApp'],
             binaries=[('/Users/me/Documents/MyApp/driver/chromedriver','driver')],
             datas=added_files,
             hiddenimports=['selenium', 'tkinter'],
etc..

This is assuming the original chromedriver binary is inside a folder called driver, and I reference the full path. Does this strategy work for you? If not, what error message are you getting? It might be worth it to try to run pyinstaller without the --onefile to see if the chromedriver is actually included. Let me know!

Jay

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/226c8b99-319a-43ac-8b32-8419b361d409%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages