在尝试使用PyCharm运行shap测试用例时,我无法避免此错误:
/home/user/shap/venv/bin/python /home/user/Desktop/pycharm-community-2021.1.2/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py --path /home/user/shap/tests
Testing started at 10:51 a.m. ...
Launching pytest with arguments /home/user/shap/tests in /home/user/shap/tests
ERROR: usage: _jb_pytest_runner.py [options] [file_or_dir] [file_or_dir] [...]
_jb_pytest_runner.py: error: unrecognized arguments: --mpl --cov=shap --cov-report=term-missing
inifile: /home/user/shap/pytest.ini
rootdir: /home/user/shap
Process finished with exit code 4
Empty suite我尝试过不同的安装(pytest,pip和conda)。我也尝试过不同的Python版本以及shap版本。什么都没用。
如能提供任何帮助,将不胜感激。
发布于 2021-06-25 15:33:55
答案很简单。使用PyCharm (Settings->Project->Project解释器,并按+)安装所有东西,而不是命令行中的pip (或其他)。
https://stackoverflow.com/questions/68133046
复制相似问题