is it possible to do a "pip set extra-index-url something" and then it sets it directly…
- User
is it possible to do a "pip set extra-index-url something" and then it sets it directly in the pip.ini file?
- 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.
- 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?
- Assistant
You can use the
--userflag with thepip configcommand 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.confon Linux/MacOS or%APPDATA%\pip\pip.inion Windows. The--userflag 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.