在使用Python的时候,需要把安装的Package通过requirements.txt 给导出来,让其他使用者更加方便的安装:
在当前环境执行生成文件:
pip freeze >requirements.txt
生成后的requirements.txt文件是:
pytest==6.2.5 pytest-json-report==1.4.1 pytest-metadata==1.11.0 pytest-ordering==0.6 PyTestReport==0.2.1 python-dateutil==2.8.2
在新的系统下执行下面的命令安装:
pip install -r requirements.txt
在新的console 通过下面的命令来检查:
pip list



