I think your best bet is to simply use a virtual environment and install dependencies as they become necessary, then just check in and out of your virtual environment as your work progresses. You can make different virtual environments as you work on different projects and leave their corresponding requirements.txt files inside of the directory python creates when installing a virtual environment. Let's say I have python3.5.2 as my normal, go-to python package (because I do).
Using python3.5 let us enter into a virtual environment with nothing more than bare bones python3.5 (no installed dependencies). To do this:
[dkennetz@node venv_test]$ python -m venv my_SO_project
[dkennetz@node venv_test]$ ls
my_SO_project
so we see, python has created a directory to house my virtual environment, but my virtual environment is not being used as my default python. In order to do this, we must activate it:
[dkennetz@node venv_test]$ source ./my_SO_project/bin/activate
So my shell now looks like this:
(my_SO_project) [dkennetz@nodecn201 venv_test]$
While we are here, let's see what our requirements look like:
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip freeze > requirements.txt
(my_SO_project) [dkennetz@nodecn201 venv_test]$ ls -alh
drwxr-x--- 3 dkennetz blank 4.0K Oct 9 09:52 .
drwxr-x--- 93 dkennetz root 16K Oct 9 09:40 ..
drwxr-x--- 5 dkennetz blank 4.0K Oct 9 09:47 my_SO_project
-rwxr-x--- 1 dkennetz blank 0 Oct 9 09:47 requirements.txt
Using blank to hide group names, but as we can see, our requirements.txt file size is empty, meaning this virtual environment has no dependencies. It is purely python3.5. Now let's go ahead and install pandas and see how our dependencies change.
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip install pandas
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip freeze > requirements.txt
(my_SO_project) [dkennetz@nodecn201 venv_test]$ more requirements.txt
numpy==1.15.2
pandas==0.23.4
python-dateutil==2.7.3
pytz==2018.5
six==1.11.0
(my_SO_project) [dkennetz@nodecn201 venv_test]$ wc -l requirements.txt
5 requirements.txt
Let's say we have written some code inside the environment and we no longer want to do any more work, so we do one final pip freeze > requirements.txt and we leave:
(my_SO_project) [dkennetz@nodecn201 venv_test]$ deactivate
[dkennetz@nodecn201 venv_test]$ pip freeze > requirements_normal.txt
[dkennetz@nodecn201 venv_test]$ wc -l requirements_normal.txt
82 requirements_normal.txt
Much more dependencies popped up, but nothing has changed in our normal environment, and nothing has changed in our virtual environment. Now let's say we have taken the rest of the day off and wish to go back to our SO_project that we created yesterday. Well it is easy:
[dkennetz@nodecn201 venv_test]$ ls -alh
drwxr-x--- 3 dkennetz blank 4.0K Oct 9 10:01 .
drwxr-x--- 93 dkennetz root 16K Oct 9 09:40 ..
drwxr-x--- 5 dkennetz blank 4.0K Oct 9 09:47 my_SO_project
-rwxr-x--- 1 dkennetz blank 77 Oct 9 09:56 requirements.txt
-rwxr-x--- 1 dkennetz blank 1.3K Oct 9 10:01 requirements_normal.txt
[dkennetz@nodecn201 venv_test]$ source ./my_SO_project/bin/activate
(my_SO_project) [dkennetz@nodecn201 venv_test]$
Let's see where we left off, (we should only have pandas installed, let's overwrite our old requirements_file):
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip freeze > requirements.txt
(my_SO_project) [dkennetz@nodecn201 venv_test]$ more requirements.txt
numpy==1.15.2
pandas==0.23.4
python-dateutil==2.7.3
pytz==2018.5
six==1.11.0
Cool so now we know we are just where we left off. Just a fair warning, I have pandas installed on my root python package, but what I do not have is the awscli (amazon web services command line interface). Let's say I want that for some reason in my package:
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip install awscli
(my_SO_project) [dkennetz@nodecn201 venv_test]$ pip freeze > requirements.txt
(my_SO_project) [dkennetz@nodecn201 venv_test]$ wc -l requirements.txt
15 requirements.txt
(my_SO_project) [dkennetz@nodecn201 venv_test]$ deactivate
[dkennetz@nodecn201 venv_test]$ ls
my_SO_project requirements.txt requirements_normal.txt
[dkennetz@nodecn201 venv_test]$ pip freeze > requirements_normal.txt
[dkennetz@nodecn201 venv_test]$ wc -l requirements_normal.txt
82 requirements_normal.txt
So we now see that installing the awscli has not made a change to our python package, but it has for our venv:
[dkennetz@nodecn201 venv_test]$ more requirements_normal.txt
appdirs==1.4.3
arrow==0.7.0
attrdict==2.0.0
avro-cwl==1.8.4
...
[dkennetz@nodecn201 venv_test]$ more requirements.txt
awscli==1.16.29
botocore==1.12.19
colorama==0.3.9
docutils==0.14
...
Finally let's say you've developed a super cool data science package entirely inside of your VM and you have made it pip install-able. The quick and easy for this is to just:
[dkennetz@nodecn201 venv_test]$ pip install -r requirements.txt
You can now use this as your package list every time your "new program" is being pip installed, and better yet you know every python package you need for it because those are the only ones you have included in your environment.
All this being said, there is no reason you can't do this every time you start a new project with new people. And if you want to have anaconda in every virtual environment you ever use, install anaconda normally:
[dkennetz@nodecn201 venv_test]$ ./Anaconda-1.6.0-Linux-x86_64.sh
[dkennetz@nodecn201 venv_test]$ source /home/dkennetz/anaconda3/bin/activate
#You will be in your anaconda environment now
(base) [dkennetz@nodecn201 venv_test]$ pip freeze > anaconda_reqs.txt
Say you've started my_SO_project2 now after that first one and you want to ensure that you have anaconda in this package. create your new venv the same way you did last time. Once inside just install all the dependencies anaconda requires and you will have a fresh anaconda virtual environment:
(my_SO_project2) [dkennetz@nodecn201 venv_test]$ pip install -r anaconda_reqs.txt
And your new venv starts as a fresh environment with nothing but anaconda installed.
I hope this clarifies what I have said in the comments, and it is helpful for you.