自定义模块--->可执行文件

1:pip install pyinstaller
2:cmd窗口下 pyinstaller -F hello.py
3:dist文件夹下面是生成的hello.exe文件
4:拷贝出来放到c盘下新建的文件夹例如my_srcipts
5:把此文件路径添加到环境变量
6:重启cmd窗口,就可以调用可执行文件了

看十遍不如自己写一遍!巩固基础,纵横开拓!
原文地址:https://www.cnblogs.com/gyxpy/p/12821511.html