"getaddrinfo failed", what does that mean? "getaddrinfo failed", what does that mean? python python

"getaddrinfo failed", what does that mean?


It most likely means the hostname can't be resolved.

import socketsocket.getaddrinfo('localhost', 8080)

If it doesn't work there, it's not going to work in the Bottle example. You can try '127.0.0.1' instead of 'localhost' in case that's the problem.


The problem, in my case, was that some install at some point defined an environment variable http_proxy on my machine when I had no proxy.

Removing the http_proxy environment variable fixed the problem.


Make sure you pass a proxy attribute in your commandforexample - pip install --proxy=http://proxyhost:proxyport pixiedust

Use a proxy port which has direct connection (with / without password). Speak with your corporate IT administrator. Quick way is find out network settings used in eclipse which will have direct connection.

You will encouter this issue often if you work behind a corporate firewall. You will have to check your internet explorer - InternetOptions -LAN Connection - Settings

Uncheck - Use automatic configuration scriptCheck - Use a proxy server for your LAN. Ensure you have given the right address and port.

Click OkCome back to anaconda terminal and you can try install commands