1

I need to install some python packages to an offline host. Normally, when you do a python setup.py 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 setup.py 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.

stevesdj
  • 23
  • 6

1 Answers1

2

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?

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • 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