python-guide icon indicating copy to clipboard operation
python-guide copied to clipboard

Section on Editing the pip.ini File on Windows Needs to Be Updated

Open davidshq opened this issue 6 years ago • 1 comments

In "Further Configuration of pip and Virtualenv" (/dev/pip-virtualenv) the Windows section doesn't seem to work (I'm using Windows 10).

One's home directory would be something like: C:\Users\johndoe

But you won't find pip in this folder. Instead, you'll find pip at a path something like: C:\python37\Lib\site-packages\pip

(BTW, I used the guide recommended method of installing python [choco])

In addition, I'd suggest breaking this section into two parts, one dealing with *nix systems and one with Windows systems. Right now they are kind of intertwined.

If what I have suggested above is amenable, I'm happy to make a pull request with the edits I'm suggesting.

davidshq avatar Feb 24 '19 21:02 davidshq

Just my two cents to the "Further Configuration of pip and Virtualenv" section in relation with Windows:

  • All the paths indicated are for pip.ini (Windows pip configuration file) and they are different from the pip package directory that you have found when searching for pip. If the folder/file doesn't exists, it can be created and it will work fine with Windows 10 (Notice though that the path currently indicated in the guide is not the current default for pip.ini configuration file, nor is the package directory path).
  • The subsection "Catching packages for future use" is basically to configure older versions of pip, It will not work with versions of pip >= 8.0.0 (2016-01-19), and it is not needed since now "pip provides an on-by-default caching mechanism that doesn’t need any configuration". It cannot work because recent version of pip use cache-dir to indicate the path for storing cache files (instead of download-cache keyword).

After having said that... i do agree that we need to updated the "catching packages for future use" subsection, maybe:

  • update the subsection to work with pip versions >= 8.0.0 (2016-01-19) or,
  • make absolutely clear that all the subsection is meant only for older versions of pip or,
  • just remove the subsection altogether, since the default caching mechanism works fine.

Mr-Io avatar May 19 '19 10:05 Mr-Io