VirtualEnvs synchronization on multiple computers

I recently purchased a new laptop, so I could work not only from my workstation.

I have a Django REST application, and for this project I am using VirtualEnv.

My question is:
How can I "synchronize" virtualenv to install new dependency packages?

On my workstation, I installed Django, Django REST, etc.

What can I do on my laptop? I don’t have to manually install new dependencies every time?

+4
source share
1 answer

Activate your virtual environment, then run:

pip freeze > requirements.txt

, . script:

pip install -r requirements.txt

sh ,

# upload change
pip freeze > requirements.txt
git add -a .
git commit -m "message"
git push

# Get files
git pull
pip install -r requirements.txt
+4

Source: https://habr.com/ru/post/1619401/