What ports does pip use?

2019-04-23 16:52发布

问题:

This is hopefully a quick one to answer, I'm trying to provision a box on AWS with puppet and one of the steps involves a pip install from a requirements file. Something like this: -

/usr/local/venv/ostcms/bin/pip install -r /vagrant/requirements.txt

The step basically fails because it can't find any of the packages in the requirements file, but when I open the AWS box's security group up to allow "All Traffic" the pip step works.

I'm trying to find the port that pip uses so I can basically have that port, http and ssh open on the box and live happily ever after.

回答1:

Pip runs on 3128 so make sure you have that open in your AWS console. Otherwise pip will get blocked when attempting to talk to PyPi (or anywhere else it cares to download from).