pip search django produces time out error

后端 未结 3 538
灰色年华
灰色年华 2020-12-10 07:34

coincidentally, I run pip search django command and I got time out error. even specifing a high value of timeout

Below the logs:

D:\\PERFILES\\rmac         


        
相关标签:
3条回答
  • 2020-12-10 07:51

    There is too short default timeout set for pip by default. You should really set this environment variable PIP_DEFAULT_TIMEOUT to at least 60 (1 minute)

    Source: http://www.pip-installer.org/en/latest/configuration.html

    0 讨论(0)
  • 2020-12-10 08:01

    the --timeout option doesn't seem to work properly.

    I can install django properly by using either:

    pip --default-timeout=60 install django
    

    or

    export PIP_DEFAULT_TIMEOUT=60
    pip install django
    

    Note: using pip version 1.2.1 on RHEL 6.3

    Source: DjangoDay2012-Brescia.pdf, page 11

    0 讨论(0)
  • 2020-12-10 08:08

    The pypi is probably overloaded. Just enable mirror fallback and caching in pip. Maybe tune the timeout a bit. Add these in ~/.pip/pip.conf:

    [global]
    default-timeout = 60
    download-cache = ~/.pip/cache
    
    [install]
    use-mirrors = true
    
    0 讨论(0)
提交回复
热议问题