Python - cant find pip.ini or pip.conf in Windows

前端 未结 11 1988
谎友^
谎友^ 2021-01-31 07:57

I got Python 2.7.8 installed on my Win7 machine, which comes with pip already pre-installed.
I\'m successfully able to install new packages from pip and now I need to add c

11条回答
  •  走了就别回头了
    2021-01-31 08:31

    Rather than guessing first check if you have any default global/local config which is read by pip with the below command:

    pip config list
    

    This will give all details of the default config loaded by python.

    If the above command doesn't give any output please try to find where pip tries to find for the global config file with the below command:

    pip config --editor  edit
    

    The above command will open the config file which pip reads by default or else it will give an error saying that the file doesn't exist.

    If there's an error please go ahead and create the exact directory and file structure as show in the error. Once the file has been created please make your changes e.g.

    [global]
    cert = /path/to/base64/ssl/certificate.pem
    proxy = http://username:password@ipaddress:port
    

    Save the file and please try to check (the above mentioned check command) if the configs are loaded by pip or not.

    For more info please follow pip config documentation

提交回复
热议问题