解决方法1
1、检查 先在venv环境中安装xxx 报错的这个包
以我的举例 查看settings>project interpreter (存在对应的包)

解决方法2
2、在xxx.spec 文件中 添加 导入模块 pytest

运行exe 运行成功.....
1、检查 先在venv环境中安装xxx 报错的这个包
以我的举例 查看settings>project interpreter (存在对应的包)

2、在xxx.spec 文件中 添加 导入模块 pytest

运行exe 运行成功.....