技术栈

pyinstaller pyqt5 pytest打包后报错no module unittest.mock

温温净2024-08-24 21:51

pyinstaller pyqt5 pytest打包后报错no module unittest.mock

在.spec文件下加上unittest.mock

打包时写成

shell 复制代码
pyinstaller --onefile --hidden-import=unittest.mock --add-data "src\tests;src\tests" src/main.py
上一篇:数学建模---论文写作
下一篇:景联文科技提供语音采集服务:开启智能交互新纪元
相关推荐
5:00
2 天前
pytest框架-详解
pytest
丿罗小黑
5 天前
Pytest项目_day15(yaml)
pytest
丿罗小黑
5 天前
Pytest项目_day16(yaml和parametrize结合)
pytest
代码小念
6 天前
Pytest+selenium UI自动化测试实战实例(超详细)
selenium·ui·pytest
丿罗小黑
6 天前
Pytest项目_day11(fixture、conftest)
pytest
测试开发技术
11 天前
软件测试中,pytest 运行完成后,如何自动发送邮件?
开发语言·python·pytest·接口测试·面试题
丿罗小黑
11 天前
Pytest项目_day08(setup、teardown前置后置操作)
pytest
测试1998
11 天前
Pytest中实现自动生成测试用例脚本代码
自动化测试·软件测试·python·测试工具·测试用例·pytest·接口测试
热门推荐
01UV安装并设置国内源02DeepSeek更新!速览DeepSeek V3.1新特性03Qwen3-Coder 快速上手教程 | Qwen Code + Claude Code04KGG转MP3工具|非KGM文件|解密音频05蜘蛛磁力 搜索引擎大全,如何使用蜘蛛磁力查找磁力链接06【2025.08.06最新版】Android Studio下载、安装及配置记录(自动下载sdk)072025最新国内服务器可用docker源仓库地址大全(2025年8月更新)08阿里开源首个图像生成基础模型——Qwen-Image本地部署教程,超强中文渲染能力刷新SOTA!09NVIDIA显卡驱动、CUDA、cuDNN 和 TensorRT 版本匹配指南10TRAE 规则(Rules)配置指南:个人习惯、团队规范与最佳实践