I’ve created a virtual environment using venv
and I’m using such environment in Visual Studio Code to run a jupyter notebook.
Now, my code stops running and from the log I can read 2 warnings: one of which is
warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Let’s suppose I want to pass -Xfrozen_modules=off
to python to see what happens, how can I do it? I mean: I’m not running python from command line, I’m just pressing Shift+Enter in Visual Studio Code to execute the code cells of my notebook; how can I pass option to python in Visual Studio Code?
2
Answers
Can you not just put
"jupyter.jupyterCommandLineArguments": ["-Xfrozen_modules=off"],
in your workspace’s .vscode/settings.json?Find the kernel.json file of the jupyter kernel under the virtual environment folder. It should be in the following path
Open the kernel.json file and add the
-Xfrozen_modules=off
parameter in"argv"
.