'Connection to pypi.org timed out

Unable to pip install 3rd party packages.

(venv) λ pip install django
Collecting django
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10AD0F0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/django/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10ADE48>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/django/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB518>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/django/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB320>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/django/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001BEF10BB7B8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/django/
  Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django

I'm trying to pip install by just typing pip install django. To give context I'm working on my own personal computer using Windows 10. All other resources I've read seem to just work around the problem. I'm trying to figure out what can be done so I can just simply...

pip install django

I'm not familiar with proxies and firewalls I'm not clear on what steeps need to be taken.



Solution 1:[1]

Seems you are using a proxy in your network. Either you need to specify the proxy details to pass it, or to stop the proxy for some time.

I think your question is similar to another question:

Proxy awareness with pip

Solution 2:[2]

This is a network issue. It seems internet is not working from your PC. As this is personal PC then you probably not using proxy. Check your internet connectivity or windows firewall on PC.

Solution 3:[3]

I also have faced the same issue. Basically there is a problem with HTTP connection. Check if Proxy is set in Path of Environment variables. If it is present remove it. Then the installation will work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Sachin
Solution 3 Krishna Varun M