首页 > 解决方案 > Python 转换成 .exe

问题描述

我想将我的 python 文件转换为.exe使用pyinstaller. 我已经使用 pyinstaller 安装了pip install pyinstaller,但是当我尝试使用时,pyinstaller我得到:

C:\Users\Varnith\Desktop\program>pyinstaller --onefile main.py
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.

标签: pythonpyinstaller

解决方案


问题是 pyinstaller 尚未添加到路径中。确保正确安装它。如果在 Windows 上,请尝试:

pip install pyinstaller

或者

py -m pip install pyinstaller

否则,pip3&python3


推荐阅读