[Tutor] migrating python to a new machine

Zachary Ware zachary.ware+pytut at gmail.com
Wed Apr 8 13:44:42 CEST 2015


On Apr 8, 2015 3:39 AM, "Jim Mooney" <cybervigilante at gmail.com> wrote:
>
> General question. I'm thinking of moving to a new machine although I hate
> to abandon trusty XP. Will I have to reinstall all my pip installed
modules
> or can I just copy the site-packages directory? And if so, is anything
else
> needed, such as where pip keeps its uninstall info?

The safest method would probably be to do `pip freeze > requirements.txt`,
copy the requirements.txt file to the new machine, and run `pip install -r
requirements.txt` there.  That way you definitely get everything (and you
can save the requirements file for backup purposes).

> Finally, is there such a thing as a standalone Python? I use a number of
> standalone programs so it seems to me it should be possible.

Do you mean like a "portable" app, that doesn't write to the registry and
keeps everything in one folder?  You can try PortablePython; I used it some
several years ago and it seemed to work fine (but that was when I was just
starting with Python).

Hope this helps,
--
Zach


More information about the Tutor mailing list