查看版本号
# 系统当前版本
python -V
# 查看系统自带的python
open /System/Library/Frameworks/Python.framework/Versions
查看当前的python路径
which python # mac自带python2
which python3 # 自安装的python3
安装路径
虚拟环境
# 创建venv
python3 -m venv venv1
# 进入venv
source venv1/bin/activate
# 退出venv
deactivate
安装依赖包
# 默认方式
pip install -r requirements.txt
# 镜像方式
pip install -i https://xxxx -r requirements.txt
执行case
# 执行整个文件夹
pytest testcase/
# 执行测试文件
pytest testcase/test_demo.py
# 执行