1、在pycharm的终端输入pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple然后输入pyinstaller -F -w main.py在文件夹的dist中就会出现main.exe,打开速度看电脑配置。