Debugger warning: It seems that frozen modules are being used (Python 3.11.0)

This is in a new, clean build using Ubuntu 22.04 LTS and Python 3.11.0 built from source.

A new message is appearing when JupyterLab starts:

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.

I don’t see any issues opened about this yet. Is there any guidance as to how to proceed? It is clear how to disable the warning via environment variable, but is that the correct choice here? If that isn’t the correct choice, how do I pass -Xfrozen_modules=off to Python? Lastly, is this caused by a problem elsewhere and both choices are in reality not correct?

I’d wait to make any big decisions… 3.11 wheels for all platforms will be… a while, though.

A near term will be reproducible binder environments working with 3.11, and the quickest path to a deeper look at this will likely be via the conda-forge python311 migration… looks like pycurl is the only thing missing in the base setup, which is semi-incredible.

It’s also worth looking at whether we slim the core binder deps down even more… though i feel kinda bad doing “exploratory” stuff right now, as every job counts.

1 Like

As of an hour ago or so, binders with an environment.yml specifyng python >=3.11 now seem to work.

If you can work up a concrete gist that busts the debugger with frozen modules, we can get down to business.

1 Like

I’m just getting started with Jupyter (jupyter-lab) and am getting this warning on a freshly installed virtualenv with python3.11 in Dec 2022. Is there any new info about fixing or suppressing this error?

I figured out that starting with

python -Xfrozen_modules=off -m jupyterlab_server

instead of just

jupyter-lab

avoids the error, but I don’t know whether this is correct or even advisable.

Any news on this?
I still get the message described above when I try to register a virtual environment in jupyer lab with:
python -m ipykernel install --user --name=vpanel

I use python 3.11.2

As before: has this warning actually done anything to impact your experience yet?

Well, it has forced me to move back to python 3.10.10…

Does the kernel not start? Did you try setting the environment variable?

Hello!

I am having the warnings as well in a similar setup. No impact on the experience
except that it tends to pollute logs. For example, when running Jupyter-Book to build
an html book from a collection of notebooks, the warning appears once per notebook
when it is executed. It makes it harder to spot real issues.

Setting PYDEVD_DISABLE_FILE_VALIDATION=1 clears the warning, so there is
an easy workaround.

Thanks for your care!

1 Like