Recently i needed to get the requirements of my Django project so i could move it to a production server.
So i researched the web and found REQUIREMENTS.TXT
to install all the requirements of your project.
NB: Use the pip freeze command in your virtualenv or else yuou will list all your dependencies
So i researched the web and found REQUIREMENTS.TXT
Why requirements.txt?
Any application typically has a set of dependencies that are required for that application to work. The requirements file is a way to specify and install specific set of package dependencies at once.
Format for requirements file:
Django ==0.10.1
djangorestframework ==1.2.0
Method 1:
$ pip freeze > requirements.txt
Use pip’s freeze command to generate a requirements.txt file for your project:
If you save this in requirements.txt, then you can
$ pip install -r requirements.txt
NB: Use the pip freeze command in your virtualenv or else yuou will list all your dependencies
Comments
Post a Comment