0

I'm trying to use pip install <package> but it always returns a timeout error as follows:

pip timeout error

I'm using Python 3.8 and pip 20.2.1 in Windows Server 2019.

I assume that it's a problem related to pip can't reach pypl.org site.

I checked proxy configuration and it is as follows, i.e., there's no proxy configuration:

Proxy Configuration

What I think is strange is that I can access the site using Chrome and download it manually. I can't find anything that is blocking pip access.

Pandas in pypi.org

What can that be?

Thanks!

dileivas
  • 21
  • 4
  • My guess is that you don't have appropriate ports allowed for internet communication. This question might be something that can help you (as it mentions the port 3128 being used by pip: https://stackoverflow.com/questions/22377175/what-ports-does-pip-use – Caldazar Sep 18 '20 at 19:12
  • Thanks Caldazar! I saw this post, is there any concrete way to be sure what port pip uses? Because in comments Cathal says that is port 443. And is there any easy way to check if this port is closed? – dileivas Sep 18 '20 at 19:28
  • 1
    1st of all, you need to check settings in AWS (if you're using default VPC for your instance, then it should be all allowed). On Windows instance, you should check your firewall settings – Caldazar Sep 18 '20 at 19:55
  • Thanks again Caldazar. There is a firewall set to "Block all connections to apps that are not on the list of allowed apps". Musst be it... – dileivas Sep 18 '20 at 21:12
  • I found this topic about pip and firewall restrictions: https://stackoverflow.com/questions/14277088/what-url-should-i-authorize-to-use-pip-behind-a-firewall – dileivas Sep 21 '20 at 21:23

1 Answers1

0

For someone that is facing the same problem, I needed to set a proxy in AWS instance. Now its working like a charm.

I also created two global environment variables

HTTP_PROXY = http://proxyIP:proxyPORT

HTTPS_PROXY = https://proxyIP:proxyPORT

Hope this is usefull for someone else. Thanks!

dileivas
  • 21
  • 4