Create backup for python and node environment

3

I am preparing to format my laptop but I have many python packages installed and accommodated in different virtual environments, the same thing happens with node.js and many modules that I have. Is there a way to make a backup for all my libraries and restore them once formatted? so I would not have to manually install them again.

    
asked by mos 14.06.2016 в 23:03
source

1 answer

2

In Python you can use pip freeze to create a file requirements.txt of all your virtualenvs ( link )

pip freeze > requirements.txt # en el venv de turno

On the new machine you can do:

pip install -r requirements.txt # en el nuevo venv de turno

In nodejs you can create a package.json and then do:

npm install # en el mismo lugar donde esté el package.json

Take a look here .

    
answered by 14.06.2016 в 23:18