easy_install script references wrong version after upgrade (Ubuntu)

Issue #296 new
Hobson Lane
created an issue

easy_install fails due to



requires = 'distribute==0.6.10'


load_entry_point('distribute==0.6.10', 'console_scripts', 'easy_install')() }}}

when I do a pip install python modules that require more recent versions of distribute, like URLObject, on an Ubuntu 10.04 server with an old version of pip (including easy_install)

Interestingly Ubuntu 12.04 easy_install continues to require a particular version of distribute (but not its other dependencies). {{{


requires = 'distribute==0.6.24dev-r0' }}}

Why not > rather than == for all dependencies (including distribute) in easy_install? Isn't distribute always reverse compatible?

Comments (5)

  1. Jason R. Coombs

    Distribute (and setuptools) creates the easy_install script as a console entry point just like any other console entry point for any other setuptools project. As a matter of course, it requires the exact version that created the entry point (the last version that was installed). Distribute could special-case this situation and make guarantees about its own entry point compatibility and write a special console script just for itself, but I don't think that's worthwhile, and here's why.

    When distribute is upgraded, by any means including pip, the entry point should also be re-written. So when Distribute 0.6.24 is installed, the script should be updated to that latest version. If it is not, that is a flaw in the way the package is installed. Configuring the console entry point script to work with future, unknown releases of Distribute might be a workaround, but it's not the proper fix and could have unintended consequences. It would be better to understand how the script is getting out of sync with the installed package.

    I suspect what is happening is an install of URLObject is triggering an upgrade of distribute, as you mentioned, and the pip technique to install dependency packages is to not install that packages scripts.

    This is only a suspicion, though. Can you confirm the exact steps required to cause the mismatch?

  2. Hobson Lane reporter

    (Reply via hobs...@gmail.com):

    Thank you for the detailed explanation. Here's what I did

    1. legacy Ubuntu 10.04 web server, up to date on security patches only 2. install django 1.4 using pip and virtualenv 3. pip barfs, recommending a manual upgrade of distribute using `easy_setup -U ...` 4. `easy_setup -U ...` succeeds (I think), but still no joy with pip install django (same error) 5. sudo sed -i -r -e 's/==/>/g' /usr/bin/easy_install 6. `pip install requirements/*` succeeds. yay! 7. post bug report

    Interestingly, when `distribute` creates the easy_install script it allows ANY version of the other python modules it requires, but won't even allow FUTURE versions of `distribute`. Seems a bit "self-important". Maybe I'm missing something. I'll just live with my customized console entry point that assumes future upgrades of `distribute` won't break my old version of easy_install.

    On Wed, Jul 11, 2012 at 5:45 AM, Jason R. Coombs <issues-reply@bitbucket.org


  3. Log in to comment