报错如下: 解决方案: 在终端中执行 python -m pytest +后面你想运行的命令,如下: python -m pytest test.py 本栏目推荐文章解决 DELPHI 中执行外部命令出现屏幕一闪的问题的方法从C++CLI工程的依赖库引用问题看.Net加载程序集机制Maven常见问题与原理技巧Hive常见问题VIM/NeoVIM:解决LuaSnip下Tab按键跳转冲突问题【Leetcode 2474. 购买量严格增加的客户】MySQL用户变量编程解决严格递增连续子序列问题test【LeetCode 2494. 合并在同一个大厅重叠的活动】MySQL用户变量编程解决区间合并问题Spark版本不兼容导致Standalone集群无法连接问题vscode错误:Unable to connect to VS Code server: Error in request.pytest 问题 test py vspytest问题test py 全局conftest pytest py 物类token test py deselect pytest问题 qtcreator问题2017 vs 预测值 上篇 问题test 过程python pytest问题 internal问题2022 vs 兼容性 项目 问题vs 乱码 报告pytest问题