在使用Python的时候,需要把安装的Package通过requirements.txt 给导出来,让其他使用者更加方便的安装:

在当前环境执行生成文件:

pip freeze >requirements.txt


生成后的requirements.txt文件是:

  1.  

    pytest==3.8.0
  2.  

    pytest-allure-adaptor==1.7.10
  3.  

    requests==2.18.1

在新的系统下执行下面的命令安装:

pip install -r requirements.txt


在新的console 通过下面的命令来检查:

pip list