I am using VS Code and want to debug a python file. I have a conda env where I installed modules such as numpy, gym etc. If I am running the python file from the terminal everything works fine. Running the VS Code debugger gives me the Error:
Exception has occurred: ModuleNotFoundError No module named 'gym'
From various previous questions, I found that I have to specify the python path in launch.json. So I did and this is my launch.json config:
{
"name": "Conda Env jssp",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"env": {
"PYTHONPATH":"${PYTHONPATH}:/Users/paul/miniconda3/envs/jssp/bin/python"
} }
Note: my conda env is called "jssp".
What am I missing? Thank you!