PIP always reinstalls package when using specific version of SVN

PIP always downloads and installs the package when a specific version of SVN is specified (it significantly slows down the synchronization process).

Is there any way around this? Typically, pip detects that the package is already installed in the environment and suggests using --upgrade .

My pip_requirements file has the following line:

 svn+http://code.djangoproject.com/svn/django/trunk/@16406#egg=Django1.4A 

Thank you for your help!

Answer

  • You must specify the name of the egg as the exact name of the python package.
  • You cannot use the -e flag.
  • Version PIP 0.7 does not work, works on 1.0.2 .
+8
python pip package-managers
source share
1 answer

Last weekend I actually hacked pips, and I think I have an explanation of your problems with pips. The problem is simply the restriction within the pip itself. Due to how the installation process works, the #egg=[egg-name] must be correctly named for the actual project name specified in setup.py kwarg (this name is known in PyPI).

Short answer

Your line:

 svn+http://code.djangoproject.com/svn/django/trunk/@16406#egg=Django1.4A 

Must be:

 svn+http://code.djangoproject.com/svn/django/trunk/@16406#egg=django 

Long answer

The installation process actually does the following for my understanding (Ian Bicking hits me if I am wrong: -P)

  • When he receives your request, he determines that the link is connected to the VCS that he knows based on the vcs + [url] structure.
  • It checks the code in a temporary directory in your environment.
  • It runs setup.py (I believe egg_info and installation)
  • The temporary directory for the extracted code is deleted from the file system

So, once step 3 is complete and your verified source is installed, Django is known as p django (case insensitive). However, if you save the current requirements string, pip will search for Django1.4A . Not finding the package matching this name, he will again check the source code and try to install it.

+3
source share

All Articles