What's the difference between Python pip's pip.conf and pypirc file?

Multi tool use
Multi tool use
The name of the pictureClash Royale CLAN TAG(#23URR8PPP)


What's the difference between Python pip's pip.conf and pypirc file?



I'm having trouble reaching a nexus server that we're using to store custom python packages. I've been told to change the settings in both my ~/.pypirc file and the ~/.pip/pip.conf file.


~/.pypirc


~/.pip/pip.conf



What's the difference between those two files in how they're used? It seems like the pip install -r requirements.txt command refers to the pip.conf file, and then the fields within the pip.conf file requires looking up the pypirc file?


pip install -r requirements.txt


pip.conf


pip.conf



Example pip.conf file:


[global]
index = https://user:password@someurl.com/somerepo/pypi-group/pypi
index-url = index = https://user:password@someurl.com/somerepo/pypi-group/simple



Example pypirc file:


[distutils]
index-servers =
pypi
nexus

[pypi]
repository: https://pypi.org/pypi
username: abc
password: def

[nexus]
repository: https://someurl.com/somerepo/pypi-internal
username: someuser
password: somepassword



Also, what's the difference between index and index-url in the pip.conf file?




1 Answer
1



.pypirc is a file standard used by multiple tools, not just pip. For example, the easy_install tool also reads that file. It contains configuration on how to access specific repositories


.pypirc


pip


easy_install



pip.conf on the other hand is only used by the pip tool. It may use information from .pypirc if authentication is needed when installing from a specific PyPI index server.


pip.conf


pip


.pypirc



However, the .pypirc file is more commonly consulted when publishing packages, not when installing.


.pypirc






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.

hVh2vJGyuNrBEAMUHQt,q,Q,BImk S0,QNijuFXJan3C6NBQY2EbC9gzMpx foENXE6LGkzoPpERm3eZi J6I9 E1S MH,mj8gMyGKVYDtKF
Jg4PJevoa03C7,W On z8lFSI,u5cyJERPVQ2p,98,mlZtSRnc i3qGteS3,OQLIdZ5b

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template