Installing multiple libraries from one python environment to another

Viewed 43

I'm a novice in Python and I wanted to migrate my work from one Python Environment to another one in a different machine, so is there another way to reinstall all of those libraries that I used in my original environment.

1 Answers

To do so, you can check the libraries (and their dependencies) and store them in a text file using this command:

    pip freeze > requirements.txt

Then, when you are using your other machine, or even a different python environment on the same machine, install all of the libraries using this command:

    pip install -r /Path to file..../requirements.txt

I hope this answers your question.

Related