window虚拟环境下打包程序

1.创建虚拟环境

python -m venv myenv  # 通用命令

2.进入虚拟环境

myenv\Scripts\activate

3.打包

pyinstaller -w -i "icon.ico" --onefile main.py