在命令行中执行以下命令 pip install -U pytest 参数解释: -U 如果你已经安装了一个软件包,它会为你升级软件包 检查安装的Pytest版本 pytest --version pytest6.0.1