I'm trying to debug a Python unit test inside Visual Studio Code, but am getting an error while importing dependencies at the top of the file:
import unittest
from scipy.io import loadmat # exception thrown here
I get a lengthy exception message:
Exception has occurred: ImportError (note: full exception trace is shown but execution is paused at: <module>)`
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
...
This happens only when debugging. Any ideas why? How can I fix this?