Robust way to ensure other people can run my python program

前端 未结 8 1350
醉酒成梦
醉酒成梦 2021-02-13 00:26

I wish to place a python program on GitHub and have other people download and run it on their computers with assorted operating systems. I am relatively new to python but have u

8条回答
  •  感动是毒
    2021-02-13 00:55

    In case converting all your python scripts into one executable can help you, then my answer below would help ...

    I have been developing a large desktop application purely in python since 3 years. It is a GUI-based tool built on top of pyqt library (python-bindings of QT C++ framework).

    I am currently using "py2exe" packaging library : is a distutils extension which allows to build standalone Windows executable programs (32-bit and 64-bit) from Python scripts; all you have to do is to:

    1. install py2exe: 'pip install py2exe'

    2. Create a setup.py script: It is used to specify the content of the final EXE (name, icon, author, data files, shared libraries, etc ..)

    3. Execute: python setup.py py2exe

    I am also using "Inno Setup" software to create installer: Creating shortcuts, setting environment variables, icons, etc ...

提交回复
热议问题