You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python -m ipykernel install --name mykernel --user
0.00s - Debugger 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.
Installed kernelspec mykernel in /u/myuser/.local/share/jupyter/kernels/mykernel
Thank you for opening this issue! This was previously reported a few times on Jupyter Discourse and it is really confusing for users (who sometimes mis-attribute other issues to this warning as it is common and easy to blame).
Can we fix ipykernel to only show this message when it's applicable (i.e. when trying to debug)?
ipykernel imports debugpy to check if it is available; this is hard to check without import, because the import can error out even if debugpy is installed see #986.
I previously suggested always appending -Xfrozen_modules=off on a higher level (on ipykernel startup). It is unclear to me if there is any downside to doing that, maybe we should give it a try?
I previously suggested always appending -Xfrozen_modules=off on a higher level (on ipykernel startup). It is unclear to me if there is any downside to doing that, maybe we should give it a try?
Seems like a better default, but maybe have some way to opt-out in case it does break someone's workflow?
Yes, it looks that we could add this in the default kernelspec and make it configurable by having an argument for kernelspec installation app. If it breaks anything we can quickly revert and switch the default.
We should condition adding this argument on ipykernel being run in CPython rather than any other Python implementation which might not support this argument.
Activity
krassowski commentedon Jan 16, 2024
Thank you for opening this issue! This was previously reported a few times on Jupyter Discourse and it is really confusing for users (who sometimes mis-attribute other issues to this warning as it is common and easy to blame).
In particular there is some relevant discussion in https://discourse.jupyter.org/t/debugger-warning-it-seems-that-frozen-modules-are-being-used-python-3-11-0/16544
ipykernel imports debugpy to check if it is available; this is hard to check without import, because the import can error out even if debugpy is installed see #986.
I previously suggested always appending
-Xfrozen_modules=offon a higher level (on ipykernel startup). It is unclear to me if there is any downside to doing that, maybe we should give it a try?mlucool commentedon Jan 16, 2024
Seems like a better default, but maybe have some way to opt-out in case it does break someone's workflow?
krassowski commentedon Feb 8, 2024
Yes, it looks that we could add this in the default kernelspec and make it configurable by having an argument for kernelspec installation app. If it breaks anything we can quickly revert and switch the default.
We should condition adding this argument on ipykernel being run in CPython rather than any other Python implementation which might not support this argument.