使用pyinstaller将python程序脱离python环境## 并且更换生成exe文件图标
我们在写出某些python程序时,可能会发送到缺乏python环境的电脑上使用(特别是具备图形界面的程序),这时我们希望将python运行环境脱离,下面我将提供一种简便的方法,即pyinstaller模块。
首先,我们安装pyinstaller,
pip install pyinstaller
接着我们在终端运行下面这行代码;
pyinstaller -F ***.py
需要注意的是,我们要确保程序所有文件在同级文件夹下,
PS E:\python objects>pyinstaller -F ***.py