Skip to content Skip to sidebar Skip to footer

Pip Hg+ And Git+ Always Downloads Package Instead Of Detecting Satisfied Requirement

My other question here just got answered about why pip svn+ was always re-downloading entire packages. Now I have a handful more packages in my pip_requirements file that always ge

Solution 1:

Short Answer

When using any VCS with pip requirement files you should always specify using #egg=[egg-name]

So your requirements file should contain:

git+git://github.com/yuchant/django-jinja2.git#egg=django-jinja2
hg+https://bitbucket.org/yuchant/django-storages#egg=django-storages

Long Answer

If you specify the pip requirements just like you do in your question without the #egg=[egg-name]. I'm going to call that string the egg identifier. The problem is very similar to your last question. Pip uses the egg identifier to search the currently installed python modules.

This is what happens if an egg identifier isn't specified:

  1. Pip searches for git+git://github.com/yuchant/django-jinja2.git in the installed modules
  2. Pip doesn't find it so it attempts to install it again

If you use an egg identifier this won't have this problem.

Post a Comment for "Pip Hg+ And Git+ Always Downloads Package Instead Of Detecting Satisfied Requirement"