My guess is that you want the virtualenv loaded in order to execute dbt jobs from the vscode shell. Instead of tricking vscode into adding the virtualenv to application’s pythonpath, the user could instead add the virtualenv directory to their system PATH. If they did this, then dbt would also point to the executable in the virtualenv regardless of if the env was loaded or not.
Can I also ask what you plan on using this for. This might help find a better answer.
It seems that I myself am the exception to the rule for almost all 'simple' installation procedures. For some reason, it WAS a path related issue:
I ran brew info python, which outputted a lot of information. At the bottom I found this:
Executable python scripts will be put in:
/usr/local/share/python
so you may want to put "/usr/local/share/python" in your PATH, too.
I added that to my PATH in /etc/launchd.conf and ~/.bashrc and lo and behold:
$ which virtualenv
tells me:
"/usr/local/share/python/virtualenv"
I still don't know why I couldn't find any pointers in the right direction, online, anywhere? Is pip install virtualenv supposed to add to the PATH itself? If so, why not on my system? Why did @bibhas tell me explicitly it was not a path issue?
How to add virtualenv to path
Thanks to @drew from FishTown Analytics for the help on this one.