Django - env folder not getting created while using VS 2015 and python 2.7
Question: I am using VS 2015 and python 2.7 to create a Web application using Django. VS
2015 asked to create a virtual env but I am getting the following error and
the env folder is not getting created;

    
    
    Installing 'pip' package manager.
    pip is already available.
    'pip' was installed successfully.
    Installing 'pip' package manager.
    pip is already available.
    'pip' was installed successfully.
    Collecting https://go.microsoft.com/fwlink/?LinkID=317969
    Exception:
    Traceback (most recent call last):
     File "C:\Python27\lib\site-packages\pip\basecommand.py", line 209, in main
     status = self.run(options, args)
      File "C:\Python27\lib\site-packages\pip\commands\install.py", line 299, in run
     requirement_set.prepare_files(finder)
      File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 360, in prepare_files
      ignore_dependencies=self.ignore_dependencies))
      File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 577, in _prepare_file
     session=self.session, hashes=hashes)
      File "C:\Python27\lib\site-packages\pip\download.py", line 810, in unpack_url
    hashes=hashes
      File "C:\Python27\lib\site-packages\pip\download.py", line 649, in unpack_http_url
    hashes)
      File "C:\Python27\lib\site-packages\pip\download.py", line 842, in _download_http_url
    stream=True,
      File "C:\Python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
      File "C:\Python27\lib\site-packages\pip\download.py", line 378, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
     File "C:\Python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
     File "C:\Python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
     File "C:\Python27\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
     File "C:\Python27\lib\site-packages\pip\_vendor\requests\adapters.py", line 447, in send
    raise SSLError(e, request=request)
    SSLError: ('_ssl.c:574: The handshake operation timed out',)
    System.InvalidOperationException: Virtual environment was not created at     'C:\Users\Jeri_Dabba\Google     Drive\Python\Django\DjangoWebProject1\DjangoWebProject1\env\'
     at Microsoft.PythonTools.Project.VirtualEnv.<CreateAndInstallDependencies>d__5.MoveNext()
     --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.PythonTools.Project.PythonProjectNode.<CreateOrAddVirtualEnvironment>d__148.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PythonTools.Project.AddVirtualEnvironmentOperation.<Run>d__10.MoveNext()
    

Could anyone please help me out with this as I am new to django.


Answer: You need to set the proxy configuration in your environment. For Windows, this
means setting the environment variables. Simply search for `environment
variables` in the Start menu, and click on `Edit environment variables for
your account`.

You need to add two environment variables `HTTP_PROXY` and `HTTPS_PROXY`, the
value is in the format `http://user:password@proxy.server.com:port`.

For example, if your proxy server is `proxy.example.com` and is listening on
port `8080`, your value is `http://user:password@proxy.example.com:8080`

Check with your network administrator for the exact settings for your
environment.

Once you have updated the variables (and clicked OK), it is very important to
**restart visual studio** otherwise the variables will not be read.

