一、python中安装jenkins
直接pip install jenkins可能会遇到类似于这种:
只需要装python_jenkins即可, 根据安装的是pip还是pip3执行:
pip install python_jenkins
pip3 install python_jenkins
二、 运行报错,配置出错
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: unrecognized arguments: --alluredir --clean-alluredir --count=1 test_url.py inifile: /Users/Downloads/test_auto/pytest.ini rootdir:
/Users/Downloads/test_auto
1、首先排查你的代码安装的环境是否都装全了![](https://img-blog.csdnimg.cn/e353bf6bed994fadb9916c1ee1349b55.jpeg)
查看环境是否装全,重新执行一遍安装,无报错,但是仍显示上方错误,去看第2条方法;
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
2、查看运行的命令是否正确
例如:电脑安装的是pip3
执行时需要执行的是:
python3 -m .py 文件
python3 -m pytest -v test.xxx.py