15

I was able to install django once in a virtual enviroment. Now whenever i try to install it with

pip install django==2.07

it returns:

 Cache entry deserialization failed, entry ignored
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))': /simple/django/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))': /simple/django/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))': /simple/django/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))': /simple/django/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))': /simple/django/
  Could not find a version that satisfies the requirement django==2.0.7 (from versions: )
No matching distribution found for django==2.0.7

Also I have: pip- 10.0.1 virtualenv- 16.0.0

This is killing me. I believe it has something to do with pip. I am a beginner so walk me through. Thanks!

Rassky
  • 161
  • 1
  • 1
  • 3
  • 1
    Check that you don't have a firewall or something that is blocking pip from accessing the internet? – solarissmoke Sep 02 '18 at 08:59
  • You may like to refer https://stackoverflow.com/questions/48622272/install-django-2-0-2-could-not-find-a-version – Ankit Sep 02 '18 at 09:06
  • Can you show the output of `env |grep -i proxy`? I think you have your proxy set to something that is not accepting connections. – Melvyn Sopacua Sep 02 '18 at 09:55
  • https://stackoverflow.com/search?q=%5Bpip%5D+ProxyError+Cannot+connect+to+proxy – phd Sep 02 '18 at 13:43
  • my firewall is turned off. – Rassky Sep 02 '18 at 18:01
  • i got it fixed. i either had to turn off my proxy or use --proxy and add username/pass which only worked about half the time( ? ). thanks everyone – Rassky Sep 02 '18 at 18:12

1 Answers1

16

Django above 2 version support only python3 , so try

pip3 install django==2.0.7

if you have python3.5 and above in your system

Also to see supported versions by pip try:

pip install django==0

and

pip3 install django==0
Dimitris Kougioumtzis
  • 2,339
  • 1
  • 25
  • 36