Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way for pip to install only new dependencies in an updated requirements.txt

Tags:

python

pip

pip install --upgrade -r requirements.txt

repeats the installation process for all the previously installed dependencies which can be a pain when I have a huge list of dependencies (like more than 30?)

Isn't there a way to check an updated requirements.txt and install only specific dependencies that have been included into the requirements.txt file since the previous installation attempt?

I find this to be a real shortcoming of pip (or using pip in virtualenv for that matter). Do not like the repetitive installation nature of pip at all.

like image 380
Calvin Cheng Avatar asked Jan 28 '12 08:01

Calvin Cheng


1 Answers

As mentioned by Piotr in the comments above, if "--upgrade" is not included in the command, already installed python packages are left alone.

like image 149
Calvin Cheng Avatar answered Jan 24 '23 07:01

Calvin Cheng