# while using existing virtualenv (oldenv): pip freeze > requirements.txt # after creating and logged-in to new virtualenv (newenv): pip install -r requirements.txt # where requirements.txt is the same file created using (oldenv)