Enrique Vargas
Enrique Vargas

Reputation: 159

How to reinstall requirements.txt

I'm working in this shared Django project, a colleague is the owner of the repo in Github. The problem I am facing right now is that he added raven to his packages and in github the requirements.txt file is updated, however when I tried with git pull, locally, my requirements.txt does not have raven added. He told me that I have to reinstall requirements.txt so I tried with pip freeze > requirements.txt but nothing change.

How can I update my requirements.txt file according the updates made from Github?

Upvotes: 0

Views: 2836

Answers (3)

Marcos Felipe
Marcos Felipe

Reputation: 118

You need to pull all changes to your local repository. To do that, you need to make sure that your git repository don't have any active changes.

git commit -am "changes"
git pull
pip install -r requirements.txt

Upvotes: 3

Walucas
Walucas

Reputation: 2578

Make sure the requirements.txt is not inside the .gitignore file, which will prevent it from being updated.

Upvotes: 1

sfidf12489
sfidf12489

Reputation: 121

After you've pulled the latest changes into your requirements.txt, you can absolutely rerun pip. Run the command with pip install -r requirements.txt and it will install any new modules.

Upvotes: 2

Related Questions