Although I use VSCode occasionally, I’m not very familiar with the details. If I understand this post correctly, you might need to run in an activated environment that includes your packages as dependencies. You might already be doing that, so you might need to ask another discourse question.