title: using repo other then pypi with pip
body: <p>I am having trouble understanding how pip works in a specific environment. The thing is that I am trying to install OpenStack using ansible-openstack deployment method. It provides playbooks to prepare the complete environment and install all components. Deployment fails at the step when python modules should be installed from a private repo (it is being built during previous deployment steps). This repo is nothing else as nginx server exposing directories with python wheels via http protocol. When OpenStack nodes are reaching over to this repo with pip in order to install packages, they seem not to find any of the packages that satisfy their constraints (I am not posting the whole command using the requirement file, but required versions are there). Each node has similarly looking HOME/./pip/pip.conf:</p>
  
  <pre><code>    [global]
      no-index = true
      pre = True
      timeout = 120
      trusted-host =
              172.21.51.152
  
      [install]
      upgrade = True
      find-links =
              http://172.21.51.152:8181/os-releases/14.0.7/
  </code></pre>
  
  <p>where 172.21.51.152 is that repo that is supposed to replace PyPI.</p>
  
  <p>When playbook tasks that should install packages are running they all fail with similar error:</p>
  
  <p>root@control1-galera-container-434df170:~# pip install MySQL-python
  Collecting MySQL-python
    Could not find a version that satisfies the requirement MySQL-python (from versions: )
  No matching distribution found for MySQL-python</p>
  
  <p>even though the file is there and I can wget it from the URL where the file is located.</p>
  
  <pre><code>    ls /var/www/repo/os-releases/14.0.7/ | grep -i mysql_python
      mysql_python-1.2.5-cp27-cp27mu-linux_x86_64.whl
  </code></pre>
  
  <p>I checked with tcpdump what kind of request pip is sending when "pip install" command is used. It sends a GET get to <a href="http://172.21.51.152:8181/os-releases/14.0.7/" rel="nofollow noreferrer">http://172.21.51.152:8181/os-releases/14.0.7/</a> where all wheel files are. Server replies with the index.html file:</p>
  
  <pre><code>    &lt;html&gt;\r\n
      &lt;head&gt;&lt;title&gt;Index of /&lt;/title&gt;&lt;/head&gt;\r\n
      &lt;body bgcolor="white"&gt;\r\n
      &lt;h1&gt;Index of /&lt;/h1&gt;&lt;hr&gt;&lt;pre&gt;&lt;a href="../"&gt;../&lt;/a&gt;\r\n
      &lt;a href="links/"&gt;links/&lt;/a&gt;                                             
      &lt;a href="openstackgit/"&gt;openstackgit/&lt;/a&gt;                                      
      &lt;a href="os-releases/"&gt;os-releases/&lt;/a&gt;                                       
      &lt;a href="pkg-cache/"&gt;pkg-cache/&lt;/a&gt;                                         
      &lt;a href="pools/"&gt;pools/&lt;/a&gt;                                             
      &lt;a href="venvs/"&gt;venvs/&lt;/a&gt;                                             
      &lt;/pre&gt;&lt;hr&gt;&lt;/body&gt;\r\n
      &lt;/html&gt;\r\n
  </code></pre>
  
  <p>After getting this reply pip seems to be satisfied with the outcome and decides that the package it was looking for is not there. I am trying to figure out if that is expected behaviour and there is something wrong with that repo or if pip is being launched with insufficient configuration that doesn't allow it to perform the search.</p>
  
  <p>I tried to delete the pip.conf altogether and pip worked normally just downloading files from PyPI. What am I missing here in order to make it work from the private repository?</p>
  
  <p>Thanks for you help! </p>