[Answer]-Migrating dependencies with django relocation

1👍

The typical way of managing dependencies for specific projects is to use pip, virtualenv and write/store all the dependencies you have installed for that particular project’s virtualenv by running

pip freeze > requirements.txt

in your project’s (root) directory and then committing the requirements.txt file into your project git repository.

You can later on reinstall all these dependencies by simply issuing:-

pip install -r requirements.txt

Failing which at this point in time, you will have to manually trying to figure out which dependencies are missing when you try to run your python project and manually pip install each one until your project works.

If you still have your old macbook (probably still do), you can create your requirements.txt file right now by running pip freeze > requirements.txt. But if you did not use virtualenv, you are essentially freezing all your dependencies that you have installed in your old macbook system-wide into your requirements.txt file.

Leave a comment