using a new computer and bringing needed libraries to it

Ned Batchelder ned at nedbatchelder.com
Sat May 17 20:17:05 EDT 2014


On 5/17/14 7:53 PM, CM wrote:
> If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer?  I'm hoping there is some simple way like just copying the Python/Lib/site-packages folder, but I'm also guessing this isn't sufficient. I was hoping I wouldn't have to just one-by-one install all of those libraries again on the newer computer.
>
> I probably want to develop on BOTH these computers for the time being, too.  One is at home and one is at a "remote site"/secret lair.  And then I'll be doing it again when I buy a newer computer at some point.
>
> Thanks.
>

Make a list of the packages you need.  Put it in a file called 
requirements.txt.  Then install them with:

     $ pip install -r requirements.txt

Keep that file up-to-date as you add new requirements.

-- 
Ned Batchelder, http://nedbatchelder.com




More information about the Python-list mailing list