5

I am trying to install Django on my windows computer, but I am unable to install it. I have been asked to setup the environment, but I am new to this, I have never used Python or Django before, I don't even know what is the use of Django properly. So far I have install Python34. I have setup the environment variables. I have installed pip. When I run

C:\Users\username>pip install Django==1.6.5
Downloading/unpacking Django==1.6.5
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement Django==1.6.5
Cleaning up...
No distributions at all found for Django==1.6.5
Storing debug log for failure in C:\Users\username\pip\pip.log

What's wrong here? I have gone step by step according to this guide here. What do I need before installing Django? Do I need to have any server or database before running this command?

Can anyone help?

Lev Levitsky
  • 63,701
  • 20
  • 147
  • 175
user3365207
  • 235
  • 6
  • 18

1 Answers1

5

It's a pip connection problem. If you are using Proxy it should be connected via proxy. First of all check if you have been connected to your proxy server using this command.

C:\>netsh winhttp show proxy

If is gives this result.

Current WinHTTP proxy settings:
    Direct access (no proxy server).

Then it means that you haven't been connected to proxy server. Please set the proxy using the commands below.

set http_proxy=http://username:password@proxyserver:proxyport
set https_proxy=https://username:password@proxyserver:proxyport

For more info, checkout this link.

user3365207
  • 235
  • 6
  • 18
Freelancer
  • 4,459
  • 2
  • 22
  • 28
  • Now I get the same error for installing PIP. `C:\Python33\Scripts>python get-pip.py Downloading/unpacking pip Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip Cleaning up... No distributions at all found for pip Storing debug log for failure in C:\Users\zhg31838\pip\pip.log` – user3365207 May 15 '14 at 09:35
  • `C:\Python33\Scripts\get-pip.py run on 05/15/14 10:34:05 Downloading/unpacking pip Getting page https://pypi.python.org/simple/pip/ Could not fetch URL https://pypi.python.org/simple/pip/: timed out Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip Getting page https://pypi.python.org/simple/ Could not fetch URL https://pypi.python.org/simple/: timed out Will skip URL https://pypi.python.org/simple/ when looking for download links for pip Cannot fetch index base URL https://pypi.python.org/simple/` – user3365207 May 15 '14 at 09:42
  • 1
    @user3365207 check this question I think it comes from a connection problem : http://stackoverflow.com/questions/17416938/pip-can-not-install-anything Are you using a virtualenv or something like that else you can try to reinstall pip. Tell me if it works. – Freelancer May 15 '14 at 10:04
  • 1
    Yes it worked after setting up the proxy configuration like [this](https://docs.djangoproject.com/en/dev/howto/windows/#common-pitfalls). Please edit your answer and write about the proxy settings in the answer for people looking for same question in future – user3365207 May 15 '14 at 10:17