In python, when I try to use the requests library or any other library that requires connecting to the internet, the response comes extremely slow.
Code as simple as the following can take 2 to 5 minutes.
import requests
requests.get('https://www.google.com')
The same code finishes within 1 second on my Linux machine.
If I use non-python method to achieve the same thing, i.e. curl
curl 'https://www.google.com'
The response comes in less than 1 second.
What may be causing this? Where should I be looking? I don't know much about networking or Macs in general, so can someone help me debug with detailed instructions?