windowspython-2.7configurationpip

Python - Can't find pip.ini or pip.conf in Windows


I have Python 2.7.8 installed on my Windows 7 machine, which comes with pip already preinstalled. I'm able to successfully install new packages from pip and now I need to add a custom repository URL to the install list of pip.

To do so I need to modify file pip.ini which is in %APPDATA%\pip\pip.ini, according to the official manual. However, there isn't any pip folder anywhere (not in Roaming, not in Local, not in LocalLow) nor is there a *PyPa folder in C:\ProgramData\PyPA\pip\pip.conf.

Where should I search for pip.ini? How can I add a foreign repository to the install list?


Solution

  • I finally got it sorted.

    Apparently for Windows users, the pip.ini configuration file is not created. However, it can be added manually!

    Just create a new %APPDATA%\pip\pip.ini and the content of a custom repository:

    [install]
    find-links = https://<login>:<password>@your.repo.com/custom/url
    

    Reference: "User guide, Searching for packages, Configuration"