Skip to content

Instantly share code, notes, and snippets.

@KhalidCK
Last active June 27, 2020 08:23
Show Gist options
  • Save KhalidCK/a60917acb65d23d3fa162e5b42de366f to your computer and use it in GitHub Desktop.
Save KhalidCK/a60917acb65d23d3fa162e5b42de366f to your computer and use it in GitHub Desktop.
set default index-url for pip on windows 10

pip.conf

The names of the settings are derived from the long command line option

Location on windows

Expected in APPDATA

Open an explorer and write: %APPDATA%\pip\pip.ini , if it does not exist, create it.

Change default index-url

  • command line option: --index-url
  • parameter : index-url
pip config list
ls "$APPDATA"/pip/pip.ini
mkdir -p "$APPDATA"/pip
notepad "$APPDATA"/pip/pip.ini
#make sure ini has an effect
pip config list
#clean-up
rm "$APPDATA"/pip/pip.ini
[global]
index-url = https://download.zope.org/ppix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment