Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

is it possible to do a "pip set extra-index-url something" and then it sets it directly…

  1. User

    is it possible to do a "pip set extra-index-url something" and then it sets it directly in the pip.ini file?

  2. Assistant

    Yes, it is possible to set an extra-index-url using pip command and have it directly update the pip.ini file by using the following command:

    pip config set global.extra-index-url <url>
    

    This command will set the extra-index-url in the global section of the pip.ini configuration file. If the file does not already exist, pip will create it.

  3. User

    it seems to set it to Writing to C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\pip\pip.ini how to make it set it to the user folder?

  4. Assistant

    You can use the --user flag with the pip config command to write the configuration file to the user folder. The updated command would be:

    pip config --user set global.extra-index-url <url>
    

    This will write to $HOME/.config/pip/pip.conf on Linux/MacOS or %APPDATA%\pip\pip.ini on Windows. The --user flag tells pip to write the configuration file to the user folder rather than the system folder.

    Make sure to replace <url> with the actual URL you want to set as the extra-index-url.