Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Search for pip distribution does not work as documented #316

andreiko opened this Issue · 1 comment

2 participants

Andrey Bulgakov Carl Meyer
Andrey Bulgakov

Documentation on "--never-download" says:

If this option is provided, virtualenv will never try to download setuptools/distribute or pip. Instead, it will exit with status code 1 if it fails to find local distributions for any of these required packages. The local distribution lookup is done in this order and the following locations:

  1. The current directory.
  2. The directory where is located.
  3. A virtualenv_support directory relative to the directory where is located.
  4. If the file being executed is not named (i.e. is a boot script), a virtualenv_support directory relative to wherever is actually installed.

I understand this as "the first match is used for installation".

In the beginning install_pip function filenames list is generated with respect to that order, but then in gets sorted by basename and the last filename from that list is used no matter from what location it came from.

Why do we need that sort at all?

Andrey Bulgakov andreiko referenced this issue from a commit
Andrey Bulgakov Possible fix for #316 34fdd56
Carl Meyer

The purpose of the sort is to install the most recent version of pip found in any of the checked locations. It could be debated whether this is the best policy, but changing it would be a backwards-compatibility problem, so a very strong case would need to be made that it is worth changing.

I agree that the docs could use clarification on that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.