I have some problems with pip, and found a solution here:

it is suggested to change a line in any of these files:

 ~/.pypirc or $PIP_INDEX_URL or pip.conf

Problem is, I can't find any of these files. Where are they located? If they are hidden, how can I make them appear with command line only?


It would be easiest to use the local configuration file ~/.pypirc as the other two options call for a little added complexity:

  1. Definition of an environmental variable ($PIP_INDEX_URL)
  2. Editing of another, more deeply nested, local file (~/.config/pip/pip.conf). This file might also be located in /etc/pip/pip.conf and in that location must be edited with the use of sudo.

The configuration file ~/.pypirc, which is a local or user configuration file, is not necessarily always present but can be created with the following command:

touch ~/.pypirc

To show this file from the command line the conventional command is:

ls -la $HOME

The -a option, or --all in its long form, reveals the hidden files. Then you can go on to edit the file as you see fit from either command line or gui...


  • touch ~/.pypirc and then what? would be useful if you added the line that would change the path – MuhsinFatih Mar 5 '18 at 10:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.