12

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.

binny
  • 649
  • 1
  • 8
  • 22
  • Seems you cannot contact server. Do you have an antivirus? If yes disable temporarily firewall, or change rules. Who is the administrator of pc? Try search this package on a browser. If it works on browser, its possible that you denied internet access to any related process – Riccardo Aug 25 '19 at 19:23
  • @uneven_mark - The browser can access `pypi.org` with it being `secure`. – binny Aug 25 '19 at 19:36
  • I disabled the firewall and it's in the process of installing. However it's taking a really long time than am I accustomed to. I'm administrator of the PC. @Riccardo – binny Aug 25 '19 at 19:38
  • When I `pip freeze` or `pip list` now, Django still does not show up in my installed packages? – binny Aug 25 '19 at 19:48
  • I have recently run into this but I am not behind a proxy. I am able to reproduce this using my local account but not with root's account. ENV: Fedora 36, python 3.10.7 Steps to reproduce: 1. python3 -m venv .venv 2. source .venv/bin/activate 3. pip install -U pip Output: `WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.vr.org timed out. (connect timeout=15)')': /pip/` – tahoe Nov 02 '22 at 08:49

3 Answers3

4

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

J.K
  • 1,178
  • 10
  • 13
1

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.

Sachin
  • 26
  • 1
1

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.