Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what url should I authorize to use pip behind a firewall?

I have a server, onto which I want to use Python, that is behind a company firewall. I do not want to mess with it and the only thing I can do is to make a firewall exception for specific URL/domains.

I also want to access packages located on PYPI, using pip or easy_install. Therefore, do you know which URL should I ask to be listed in the exception rules for the firewall, except *.pypi.python.org?

like image 640
Marc-Olivier Titeux Avatar asked Jan 11 '13 11:01

Marc-Olivier Titeux


People also ask

What URL is pip using?

Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.

What is the IP address range of a pip?

It follows that there are 232 possible IPv4 addresses, from 0 to 4,294,967,295 (where the upper bound is 232 - 1). But this is a tutorial for human beings, not robots.

Does pip use HTTP?

pip searches http://pypi.python.org/pypi by default but alternative indexes can be searched by using the --index flag.

What is pip connection?

PIP in telecommunications and datacommunications stands for Private Internet Protocol or Private IP. PIP refers to connectivity into a private extranet network which by its design emulates the functioning of the Internet.


1 Answers

You need to open up your firewall to the download locations of any package you need to install, or connect to a proxy server that has been given access.

Note that the download location is not necessarily on PyPI. The Python package index is a metadata service, one that happens to also provide storage for the indexed packages. As such, not all packages indexed on PyPI are actually downloaded from PyPI, the download location could be anywhere on the internet.

I'd say you start with opening pypi.python.org, then as individual package installions fail, check their PyPI page and add the download location listed for those.

like image 53
Martijn Pieters Avatar answered Sep 17 '22 01:09

Martijn Pieters