突然在命令行执行 pytest报错提示
Fatal error in launcher: Unable to create process using ‘“c:\software\python39\python.exe” “D:\software\Python39\Scripts\pytest.exe” --version’: ?
???
问题分析:
从报错的提示看是不通过这个路径的Python 没办法打开pytest
用这个路径也在本地去查发现没有这个文件,想起来之前重装系统移动了python的安装路径
解决思路
- 用文本打开pytest.exe文件搜索python 找到关联的python路径的地方 修改成当前有效的python路径
修改地址
- 重新安装一次pytest 先pip uninstall pytest 再 pip install pytest