Search code examples
pythonsetuptools

What is an efficient way to reinstall all my python libraries after baselining my windows pc?


My windows laptop is being replaced due to some hardware problems. I've spent the last two years installing third party libraries every so often, which I'll need to reinstall on the new machine. I just need to:

  1. Generate a list of third party python libs current installed
  2. Reinstall those on the new machine

My thought right now is to look at c:\python\lib\site-packages and manually write out the list, then try to create a configuration file for Setuptools and EasyInstall which I could run as a script of sorts, which would install all these libraries. Is that feasible?


Solution

  • Take a look at pip's freeze command and install from requirements file: http://pip.openplans.org/#freezing-requirements

    Warning: pip may not be able to install all your packages in Windows (I think it has some limitations for some packages with native libraries that must be recompiled).