在虚拟环境中使用pip生成: (venv) $ pip freeze >requirements.txt 当需要创建这个虚拟环境的完全副本,可以创建一个新的虚拟环境,并在其上运行以下命令: (venv) $ pip install -r requirements.txt 转载于:https://www.cnblogs.com/lfxiao/p/9306187.html