1

I want to duplicate my Python development station. I need to be able to install, with pip, the same libraries that were installed on the original station. Is there a simple way to that instead of going into the pip list and installing all the libraries one by one ?

The Main purpose is to be able to duplicate the same environment that I have in one station to another station with minimum overhead. I won't like to be required to track the existence or absence of the libraries by myself

Moshe S.
  • 2,134
  • 2
  • 11
  • 25
  • 1
    You should use virtual environments. –  Jan 03 '18 at 15:01
  • I second @hop . You might also want to take a look at docker containers. – Alfe Jan 03 '18 at 15:05
  • 2
    If under linux then `$ pip freeze > requirements.txt` and then `$ pip install -r requirements.txt` – freakish Jan 03 '18 at 15:05
  • this is now the officially recommended tool: https://github.com/pypa/pipenv –  Jan 03 '18 at 15:06
  • If you are using pycharm ==> change the interpreter and then select from conda package install which libs you want to install. –  Jan 03 '18 at 15:26

1 Answers1

2

1.(On virtual enviroment) Save libraries and versions

pip freeze > requirements.txt

2. Install on new enviroment

pip install -r <path of requirements.txt>
Gianmar
  • 363
  • 1
  • 9