查询pytest --version报错 AttributeError: module ‘collections‘ has no attribute ‘Mapping‘,卸载pytest重新安装
卸载pytest及关联的插件
先查询一下pytest及对应关联的插件
pip uninstall colorama exceptiongroup iniconfig packaging pluggy tomli allure-pytest pytest-allure-adaptor pytest
回车,每次都回复Y,同意卸载
再重新安装pytest
pip install pytest -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
有个错误,单独安装一下
pip install attrs==19.2.0 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install allure-python-commons==2.13.2 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
再查询版本号正常pytest --version