I'm converting a shell script to Python and I'm searching for a way to activate and deactivate a conda environment programmatically in Python. I've looked through the Conda code on Github and haven't been able to find a good solution.
I need the environment to be activated so that I can run multiple statements in it. For example:
source activate my_env
easy_install numpy
backup_db
initialize_db
source deactivate
I'm having no luck using subprocess. :-(