dchackett / taxi

Lightweight portable workflow management system for MCMC applications
MIT License
3 stars 1 forks source link

Bad interaction between virtualenv and Anaconda in batch systems #34

Open etneil opened 6 years ago

etneil commented 6 years ago

Specifically, Fermilab's batch system, but this is presumably a problem anytime .bashrc is sourced before running. Anaconda python ensures that you invoke it over any other system version by introducing the following into .bashrc:

export PATH="~/anaconda/bin:$PATH"

As long as you load into a virtual environment AFTER this, then everything is fine. But sourcing .bashrc while in a virtual environment will give you the Anaconda python executable instead of the virtualenv one - which then causes problems. (Specifically, taxi.sh calls the wrong python executable and can't find Taxi at all.)

Installing Taxi into the anaconda environment is a likely workaround, but the encapsulation of virtualenv is nice, so it may be worth investigating whether this can be fixed within Taxi.