1

I currently have a pip mirror installed on an internal server (this is an offline network). The url to access it is http://pypi.python.org/simple. I have created a configuration file at ~/.pip/pip.conf with the following contents:

[global]
index-url = http://pypi.python.org/simple
trusted-host = pypi.python.org

I can successfully install packages that don't have nested dependencies, such as by performing pip3 install requests. I get the output of it installing requests, idna, chardet, certifi, and urllib3 successfully. However, when I need to install something from pip that has nested dependencies, such as via pip3 install driller, I get the following output:

Collecting driller
  Downloading driller-1.0.tar.gz
Collecting angr (from driller)
  Downloading angr-8.19.2.4.tar.gz (758kB)
  100% |                          | 768kB 75.7MB/s
  Complete output from command python setup.py egg_info:
  Download error on https://pypi.python.org/simple/pyvex/: [Errno 111] Connection refused -- Some packages may not be found!
  ...

It's weird to me that the error occurs as a result of attempting to reach https://pypi.python.org/simple as opposed to my local mirror that I specified via index-url at http://pypi.python.org. Additionally, if I perform pip3 install pyvex it installs just fine. Am I missing how to propagate my index-url/trusted host through the pip install command when there are nested dependencies?

fowlball1010
  • 343
  • 3
  • 13
  • Does this answer your question? [Why does Pip disregard configured repository with nested dependencies?](https://stackoverflow.com/questions/59932377/why-does-pip-disregard-configured-repository-with-nested-dependencies) – sinoroc Jan 28 '20 at 14:41

1 Answers1

0

I had the exact same question and got the answer in this thread on StackOverflow.

Here is the solution

Find the Python directories on your system and add the following two lines to the distutils.cfg in the folder distutils. If the config file does not exist yet, create it.

[easy_install]
index_url = blablabla
trallnag
  • 2,041
  • 1
  • 17
  • 33