很多查詢結果都是先卸載pytest-allure-adaptor,然后再安裝allure-pytest
pip3 uninstall pytest-allure-adaptor
pip3 install allure-pytest
嘗試了好幾次,仍然報錯AttributeError: module 'allure' has no attribute 'severity_level'
因為在pycharm中用的python版本是3.6,所以也沒懷疑是python版本問題,后來在終端驗證python版本,默認是3.4.4
可能是python版本問題,因為httprunner V3.x要求的python版本是>=3.6,<4.0,所以重新安裝python 3.8版本后,運行正常