Configure VSCode Python Interpreter when in a Veracrypt drive

127 Views Asked by At

I'm trying to get VSCode to recognize my python interpreter within a Veracrypt mounted drive but it won't work. Tried configuring python.pythonPath in settings.json, tried reinstalling virtual environment no luck. It only sees local versions of python.

Works fine when my project is on my local drive. Anyone have any luck with this?

Tried putting it in settings.json

2

There are 2 best solutions below

0
On

enter image description here

this is my settings

"python.venvPath": "/Users/whitek/workspace",
"python.venvFolders": [
    "envs",
    ".pyenv",
    ".direnv",
    ".env"
],

you just need to specify python's virtual environment folder

0
On

Thanks but looks like I'm just a moron. I restarted vscode after, rebooted the virtual python env in my terminal and it works now. Also when you start up the virtual environment it takes a couple of seconds for the VSCode status bar to pick up the new python environment.