This is my first time posting a question here as most of my questions have already been answered by someone else! I am working on a GUI application in python and am attempt
pyinstaller --hidden-import=pkg_resources.py2_warn --onefile example.py
you can use this really it works no need to install or uninstall anything just use this it will create one file only , below code will not create the black window also if you are creating a Tkinter application mainly
pyinstaller --hidden-import=pkg_resources.py2_warn --onefile --noconsole example.py