1

I made a script which automates some processes using Selenium and another one where i store variables like password and email.

How do I convert it all into a .exe installer so people don't have to download selenium, python etc to set it up. Its important that the person has to be able to still edit the one file where the details are saved.

Im thankful for any help

zami
  • 19
  • 1
  • 2

2 Answers2

0

You can do this using pyinstaller. The commands must be run on a windows os.

pip3 install pyinstaller
pyinstaller --onefile <your_script_name>.py
Hussar
  • 53
  • 5
  • ye but then only 1 script gets converted right? no selenium or nuffin right? – itsolidude Aug 01 '19 at 22:54
  • I haven't tried it with selenium yet specifically, but It includes the dependencies of the launch script (I assume from import statements) to find which libraries need to be included and adds all of them in one .exe @itsolidude – Hussar Aug 01 '19 at 22:57
  • i just tried it and it seems like it doesnt work, i too would like to find a way to do this – itsolidude Aug 01 '19 at 23:08
0

You can add selenium and browser driver via spec file.

a = Analysis(['myscript.py'],
         pathex=['path\\to\\my\\script'],
         binaries=[ ('path\\to\\my\\chromedriver.exe', '.\\selenium\\webdriver') ],
         datas=None,

And then run the pyinstaller with this spec file: pyinstaller myscript.spec myscript.py

Arun Augustine
  • 1,690
  • 1
  • 13
  • 20