title: Docker: Install python packages offline
body: <p><em>What I am trying to do?</em></p>
  
  <p>Install all dependencies mentioned in requirements.txt using downloaded wheel files i.e. offline installation of packages in <strong>Docker</strong></p>
  
  <p><em>What I have done?</em></p>
  
  <p>By following this <a href="https://stackoverflow.com/questions/11091623/how-to-install-packages-offline">thread</a> I managed to download all my wheels into a wheelhouse folder using <code>mkdir wheelhouse &amp;&amp; pip download -r requirements.txt -d wheelhouse</code> and I created a compressed tarball <code>wheelhouse.tar.gz</code> containing all my downloaded <code>.whl</code> files along with a <code>requirements.txt</code></p>
  
  <p>When I try to install the wheels locally (outside Docker) using <code>pip install -r wheelhouse/requirements.txt --no-index --find-links wheelhouse</code>, it works! </p>
  
  <p>But when I run the same in Docker, it doesn't with the following error:</p>
  
  <pre><code>Processing ./wheelhouse/beautifulsoup4-4.8.2-py3-none-any.whl 
  ERROR: Could not find a version that satisfies the requirement blis==0.4.1 (from -r ./wheelhouse/requirements.txt (line 2)) (from versions: none)
  ERROR: No matching distribution found for blis==0.4.1 (from -r ./wheelhouse/requirements.txt (line 2))
  </code></pre>
  
  <p>While actually, the wheel for <code>blis 0.4.1</code> is present in my wheelhouse directory. </p>
  
  <p><strong><em>Can anyone please help me identify why it doesn't run on Docker and runs on local?</em></strong></p>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code>FROM python:3
  
  COPY . /app
  WORKDIR /app
  
  RUN tar -zxf ./wheelhouse.tar.gz 
  
  RUN pip install -r ./wheelhouse/requirements.txt --no-index --find-links ./wheelhouse
  </code></pre>
  
  <p><strong>Screenshot of <code>wheelhouse</code> directory</strong>:</p>
  
  <p><a href="https://i.stack.imgur.com/hMJYk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hMJYk.png" alt="c"></a></p>