sashahart / vex

Run a command in the named virtualenv.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with Conda

jswoboda opened this issue · comments

In the past I used Vex with Anaconda and its worked really well. In the last few updates anaconda has changed the the commands instead of just source a file. Conda also changed the way things are set up in the bash profile or bashrc file. Instead of just adding to the path they do this,

 __conda_setup="$('~/anaconda2/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
 eval "$__conda_setup"

When you want to move to different to a different environment you need to do the

conda activate env

I was wondering if there is anyway to change the commands that vex does to set up the virtual environment? I've found a work around with vex but its not as elegant as I hoped.

vex isn't involved in the function of conda activate. Nor is it involved in setting up your shell. The whole point of vex is that you don't need to munge the shell environment to use it, because it runs a new process.

vex should work fine with any virtualenv created using virtualenv or python3 -m venv. The way virtualenvs work is fundamentally pretty simple and hasn't changed in any basic way.

If conda's equivalent of virtualenvs aren't interoperable then that was their choice - the same way they forked the whole package system