I would like to understand how to use pipwith several environments, I have a universal flack web project where my production environment needs pip installation
pip install flask psycop2 Flask-SQLAlchemy
In my dev & test environment, these and some additional materials are needed
pip install flask psycop2 Flask-SQLAlchemy factory-boy flake8 WebTest
I know that I can start pip freeze >> requirements/dev.txtand then make a file with a name prod.txtin the same folder cut and copy all the general requirements in it and add it -r prod.txtto mine dev.txtso that it also sets the requirements for prod.
My question is how to use the freezeze package to install a specific require.txt file during its installation, let it say the following I need flake8-debuggerit, obviously, I need to go to dev.txt to do this without constantly freezing one file and pasting package?
Should I just go and add flake8-debuggerno version before dev.txtand run, pip install -r requirements/dev.txtor is this a more elegant workflow for this?
source
share