This is my first post, thanks for viewing in advance. I wanted to convert test.py to test.exe using pyinstaller. Everything worked fine until I tried to use -w option to get rid of the console window. It says-
'Failed to execute script test'
Below is the code -
from selenium import webdriver
browser = webdriver.Firefox()
I guess when using '-w' option for script with external applications like browser it will pop up with this error? Thanks guys
your script is fine, it's the way you are using pyinstaller. to get rid of the console window you need pyinstaller added to your system path and then type this in a regular command prompt:
pyinstaller script.py --windowed
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.