title: How to install multiple .whl files in the right order
body: <p>I have recently found myself in the situation of having to install all dependencies (20+) of a python project on a machine without internet connection. I used <code>pip download ...</code> to get all the <code>*.whl</code> files and transferred them manually. Only now I fully appreciate the genius of pip and how it figures out the dependency tree on its own and manages to install every package in the right order. E.g. a package depends on the <code>requests</code> package which on its own depends on the <code>urllib3</code> package and so on.</p>
  <p>I wanted an automated way to install all these dependencies on the machine using the command console or python itself, so I turned to StackOverflow and found these solutions:
  <a href="https://stackoverflow.com/questions/43314517/how-to-install-multiple-whl-files-in-cmd">How to install multiple whl files in cmd
  </a></p>
  <p>Nearly all suggested solutions work for me, however have the disadvantage of having to run them multiple times until no installation fails anymore! This is due to the scripts/commands sorting the packages alphabetically and trying to install them in that order (e.g. trying to install <code>requests</code> before <code>urllib3</code> is in place).</p>
  <p>Is there a smarter way to do this with only executing a script/command on time?</p>