I'm having a similar issue getting oneAPI's MKL vars loaded on my vscode-jupyter notebook extension.
I found a work around by simply loading the environment vars before opening vscode:
(base) joe@cool$ source /opt/intel/oneapi/setvars.sh
:: initializing oneAPI environment ...
bash: BASH_VERSION = 5.2.21(1)-release
args: Using "$@" for setvars.sh arguments:
:: compiler -- latest
:: mkl -- latest
:: tbb -- latest
:: umf -- latest
:: oneAPI environment initialized ::
(base) joe@cool$ code&
But, I hope there is a better way to do this without closing and re-opening vscode
every time I need to load a python library built with oneAPI's MKL calls.