pythondjangopipdjango-extensions

Install django-extensions in requirements.pip


I am working in a team of programmers. I would like to install werkzeug and django-extensions in our main Django project. I know I have to insert something confusing for me in requirement.pip in such a way we could simply do pip install -r requirements.py. Could anyone have an idea what do I have to insert in that file?


Solution

  • pip uses what's known as a requirements file, this is usually a text file and it's most unusual to name it as requirements.pip or requirements.py. The file just contains a list of packages that will be installed by pip when invoked as

    pip install -r requirements.txt
    

    more details here: https://pip.pypa.io/en/stable/user_guide/#requirements-files. IN your case your file would look like

    django-extensions
    Werkzeug
    

    Of course you can get fancy and include exact versions or minimum versions, exact versions etc. Most often requirements files are generated by

    pip freeze > requirements.txt
    

    to ease setting up similar virtualenvs on different servers.