Python can't access the Internet on Windows Server 2003

5,847

Your proxy settings seem to be stopping you script accessing the internet.

Goto Control panel/Internet options/Connections/Lan Settings and untick/confirm everything.

Share:
5,847

Related videos on Youtube

TheLukeMcCarthy
Author by

TheLukeMcCarthy

Luke works as a software and web developer. His goal is to automate repetitive mundane tasks to empower people to become more productive, do more interesting higher value activities, and help people leave work on time. Some of his most interesting technology discoveries can be found on his blog http://my-side-projects.blogspot.com Luke is also a self-proclaimed foodie and chocoholic, he insists he can give up chocolate up anytime he wants however currently has no plans to do so.

Updated on September 18, 2022

Comments

  • TheLukeMcCarthy
    TheLukeMcCarthy over 1 year

    I'm trying to install the requests package on windows 2003 with Python 3.4.0 I have also tried Python 3.2 and got the exact same result.

    When I try an install using pip I get the following error

    C:\Python34\Scripts>pip install requests
    Downloading/unpacking requests
      Cannot fetch index base URL https://pypi.python.org/simple/
      Could not find any downloads that satisfy the requirement requests
    Cleaning up...
    No distributions at all found for requests
    Storing debug log for failure in C:\Documents and Settings\Administrator\pip\pip.log
    

    When I try with easy_install i get the following error

    C:\Python34\Scripts>easy_install requests
    Searching for requests
    Reading https://pypi.python.org/simple/requests/
    Download error on https://pypi.python.org/simple/requests/: [WinError 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found!
    Couldn't find index page for 'requests' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading https://pypi.python.org/simple/
    Download error on https://pypi.python.org/simple/: [WinError 10061] No connection could     be made because the target machine actively refused it -- Some packages may not be found!
    No local packages or download links found for requests
    error: Could not find suitable distribution for Requirement.parse('requests')
    

    I managed to install requests on Python 3.2 from source however when I try and use requests on it fails with the error message

    File "C:\Python32\lib\site-packages\requests-2.3.0-py3.2.egg\requests\adapters.py", line 378, in send raise ProxyError(e) requests.exceptions.ProxyError: ('Cannot connect to proxy.', error(10061, 'No connection could be made because the target machine actively refused it'))

    It seems as if Python doesn't have access to the network. The Windows Firewall is turned off, the machine doesn't have a virus scanner, proxy or third party firewall. The machine can access the network/Internet with other applications.

    I have also run the script I have written on another machine and everything works as I expect it to. Does anyone have any ideas on what is going on? Any help would be greatly appreciated.

    • rob
      rob almost 10 years
      Control panel/Internet option/connections/lan settings untick everything
    • TheLukeMcCarthy
      TheLukeMcCarthy almost 10 years
      Thanks @rob that solved the issue, can you add it as an answer so I can mark this question as solved?