Skip to content
Advertisement

how to make a package(pypi) for pyqt5 app on windows?

I wrote an application with pyqt5 and packaged it using python setup.py sdist to make it available on PyPi the app runs well on Linux distributions but there is a problem with windows when i run it ,it does open a console then the actual app shows up is there any way to fix it ?

enter image description here

setup.py

JavaScript

Advertisement

Answer

Instead of 'console_scripts', use 'gui_scripts'.

Two groups of entry points have special significance in packaging: console_scripts and gui_scripts.

[…]

The difference between console_scripts and gui_scripts only affects Windows systems. console_scripts are wrapped in a console executable, so they are attached to a console and can use sys.stdin, sys.stdout and sys.stderr for input and output. gui_scripts are wrapped in a GUI executable, so they can be started without a console, but cannot use standard streams unless application code redirects them. Other platforms do not have the same distinction.

The packaging guide

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement