Reputation: 1618
Is there a way (list of manual steps) to migrate 3rd party modules installed in one python installation on one machine to another machine?
This would be of great help to me because I have installed the list of 3rd party modules in one of my machines (using pip
tool) and I want to migrate this setup to another machine where I cannot install using pip
(due to network restrictions).
Upvotes: 1
Views: 1245
Reputation: 5562
Here is a completely different suggestion, this is recommended if you want to synchronize the packages between the two PCs and not cloning everything just once.
It only works if you install packages with pip. It does not work for packages which are not installable/installed with pip.
Set up the pip cache to a network storage / USB stick which is accessible from both PCs (see https://stackoverflow.com/a/4806458/851737 for instructions)
Freeze your current package environment from the source PC into a requirements file:
$ pip freeze > req.txt
Copy the req file to the target PC and install the packages:
$ pip install -r req.txt
If you put the req.txt under a VCS you can automate and synchronize this process very smoothly.
Upvotes: 1