Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python can't find the file pip.conf

Tags:

pip

I can't find the file pip.conf in the path ~/.config/pip/pip.conf or the path ~/pip/pip.conf. My version of pip is 8.1.2

like image 560
user5324426 Avatar asked Aug 10 '16 09:08

user5324426


People also ask

Where is my pip conf file?

pip/pip. conf . The legacy “per-user” configuration file is also loaded, if it exists: $HOME/. pip/pip.

What is pip conf?

It contains configuration on how to access specific PyPI index servers when publishing a package. pip. conf on the other hand is only used by the pip tool, and pip never publishes packages, it downloads packages from them.

Where are pip credentials stored?

pip supports loading credentials stored in your keyring using the keyring library. Note that keyring (the Python package) needs to be installed separately from pip. This can create a bootstrapping issue if you need the credentials stored in the keyring to download and install keyring.


2 Answers

As stated in the documentation, the default locations for Linux are:

  • per-user: $HOME/.config/pip/pip.conf
  • global: /etc/pip.conf
like image 169
xystum Avatar answered Sep 27 '22 20:09

xystum


https://pip.pypa.io/en/stable/user_guide/#configuration

If you do not have the pip.conf by default, create it on your desired directory and do the export.

export PIP_CONFIG_FILE=/path/to/pip.conf 
like image 23
Logesh Veera Kumar Avatar answered Sep 27 '22 19:09

Logesh Veera Kumar