简体   繁体   中英

Execute python file with windows shortcut

I have a python code which takes as input an Excel file and the output is a picture (for example a graph). This works really well and I'm happy with that.

A friend of mine, who is unfamiliar with coding, would like to use this tool as well. Therefore I would like to make it easy for him and create a shortcut (Windows command) which can execute the script.

Is this possible, and if yes, how??

To build on Random Guy's answer, pyinstaller is most likely what you want. It will package up all your dependencies into a single executable.

I usually use this command when creating an exe.

pyinstaller --onefile --windowed script.py --name Script

您可以尝试创建一个快捷方式到c:/...Python.exe path/to/your/script.py

您可以使用 Pyinstaller 等工具创建一个 exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM