PyInstaller not picking up selenium and urllib3 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: PyInstaller not picking up selenium and urllib3 (/thread-17860.html) |
PyInstaller not picking up selenium and urllib3 - davork - Apr-26-2019 Hello World, I am having a problem when generating exe file using PyInstaller. This is the command that I run to generate an executable : pyinstaller.exe --onefile --icon=01.ico -- myscript.py I have tried to add hidden-import selenium and hidden-import urllib3 but still here is an error message that I am getting: btw script is working without any problems when running from VS.Thanks RE: PyInstaller not picking up selenium and urllib3 - SheeppOSU - Apr-27-2019 Try using the auto-py-to-exe https://www.youtube.com/watch?v=OZSZHmWSOeM RE: PyInstaller not picking up selenium and urllib3 - davork - May-08-2019 Nope... still not working RE: PyInstaller not picking up selenium and urllib3 - buran - May-08-2019 (Apr-26-2019, 11:08 AM)davork Wrote: This is the command that I run to generate an executable : pyinstaller.exe --onefile --icon=01.ico -- myscript.pyAfter you use this command pyinstaller.exe --onefile --icon=01.ico myscript.py you will get a myscript.spec file.Edit the spec file to explicitly add hidden imports then use pyinstaller.exe --onefile --icon=01.ico myscript.spec https://pythonhosted.org/PyInstaller/spec-files.html by the way you may include also the icon in the spec file RE: PyInstaller not picking up selenium and urllib3 - davork - May-09-2019 @buran when I populate this part of my spec file like this "hiddenimports=[urllib3]" and after I save it and run a pyinstaller.exe --onefile --icon=01.ico myscript.spec I get message "NameError: name 'urllib3' is not defined" RE: PyInstaller not picking up selenium and urllib3 - buran - May-09-2019 it should be hiddenimports=['urllib3'] or you can add --hidden-import=urllib3 option on the CLI |