Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to install some python packages to an offline host. Normally, when you do a python install on one of these packages, if it can't find the dependencies needed it will try to download them from pypi. My offline host can't get to pypi, and the installation fails. If I only had one package, I could manually get the dependencies, but I have to install several packages, and some that I've looked at more closely have quite a few dependencies. Specifically, there is a list that's part of the setup module that contains values of packages by pypi name.

I could certainly scrape the file to find these dependencies, but I still would have to manually and recursively check those dependencies for their dependencies. It seems like I'm probably not the only person who's ever had to do this, but none of my searching has turned up an existing solution.

share|improve this question
up vote 2 down vote accepted

Install all the dependencies on a connected host, then tar up the newly installed dependencies from the site-packages directory, and walk it over to your disconnected system - unless I'm missing something about your requirements?

share|improve this answer
I would upvote you if I could, because I think you set me on the right track. I found what I was looking for in dist-packages; the site-packages directory was empty. I'm not sure what the difference is between those two, but I'm going to find out. There's so much about package management I'm completely clueless about. Thank you. – stevesdj Oct 12 '11 at 19:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.