CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)

PyCharm や Intellij IDEA Ultimate の 「Debug」 で見かけました。


/path/to/python3.11 /path/to/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/python/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 59014 --file /path/to/test.py 
-------------------------------------------------------------------------------
pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)
pydev debugger: The debugger may still function, but it will work slower and may miss breakpoints.
pydev debugger: Related bug: http://bugs.python.org/issue1666807
-------------------------------------------------------------------------------
Connected to pydev debugger (build 222.4345.14)
pydev debugger: Unable to find real location for: <frozen codecs>
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap>
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap_external>
pydev debugger: Unable to find real location for: <frozen zipimport>
pydev debugger: Unable to find real location for: <string>
pydev debugger: Unable to find real location for: <frozen posixpath>
pydev debugger: Unable to find real location for: <frozen _collections_abc>
pydev debugger: Unable to find real location for: <frozen os>
pydev debugger: Unable to find real location for: <frozen abc>
pydev debugger: Unable to find real location for: <__array_function__ internals>
pydev debugger: Unable to find real location for: <frozen genericpath>
pydev debugger: Unable to find real location for: <frozen io>

以下を Edit Configrations から Interpreter options に追加すれば消える。


-Xfrozen_modules=off

CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)

「Run」 や OS の Termnal から実行すると出ない。

IDE に同梱されてる pydevd が古くて、

Debug するスクリプト(インターラプタ) と pydev の バージョン間の相性がイマイチ

という感じか。

非stable な 3.11.x なども、コマンドのオプションとしてつけると消える。

👉 課題 1666807: Incorrect file path reported by inspect.getabsfile() - Python tracker hatena-bookmark
👉 "CRITICAL WARNING" error debugging Python 3.11 code : PY-56939 hatena-bookmark
👉 fabioz/PyDev.Debugger: Sources for the debugger used in PyDev, PyCharm and VSCode Python hatena-bookmark


関連ワード:  AndroidIDEAJetBrainspythonおすすめツール評判開発