Windows: run python command from clickable icon

前端 未结 4 762
北荒
北荒 2020-12-20 19:25

I have a python script I run using Cygwin and I\'d like to create a clickable icon on the windows desktop that could run this script without opening Cygwin and entering in t

4条回答
  •  盖世英雄少女心
    2020-12-20 19:47

    As an alternative to py2exe you could use the pyinstaller package with the onefile flag. This is a solution which works for python 3.x.

    1. install pyinstaller via pip

    2. Package your file to a single exe with the onefile flag

    pyinstaller --onefile your_file.py
    
    

提交回复
热议问题