Reuse the Dependency Environment
Export and Restore Environments
Activate the environment you want to reuse, then export its dependencies with the tool you used to set it up: Conda or pip. Use the matching commands to restore it.
Conda
Export the active environment:
# 当前激活 p4casesync 环境conda env export > environment.ymlTo export only explicitly installed packages, use Conda’s history. The command above exports the active environment.
Restore:
conda env create -f environment.ymlconda activate p4casesyncpip and venv
Export:
# 激活你的 venv 后pip freeze > requirements.txtRestore:
# Windowspython -m venv .venv.venv\Scripts\activatepip install -r requirements.txt
# macOS/Linuxpython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt