python 3.11:调试器不再正常工作

问题描述 投票:0回答:4

所以我刚刚安装了 python 版本 3.11 并更改了 pycharm 中的 python 解释器,并且在将软件包重新安装到新的 venv 后,代码现在可以正常运行了。

但是当我调试代码时,我不断收到一长串警告,但我不知道如何修复它:

-------------------------------------------------------------------------------
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 221.5080.212)
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: <frozen ntpath>
pydev debugger: Unable to find real location for: <frozen genericpath>
pydev debugger: Unable to find real location for: <frozen os>
pydev debugger: Unable to find real location for: <frozen _collections_abc>
pydev debugger: Unable to find real location for: <string>
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 io>

我为所有用户将其安装到 C:\Program Files 如果有帮助的话

python python-3.x pycharm version
4个回答

0
投票

对我来说,这个错误只是因为错误地调用了函数而出现的。我有相互引用的参数。

funct(my_array, my_array[0])


0
投票

降级 Python 也是一种选择。这对于创建新的 Anaconda 环境进行测试特别简单快捷。
在 3.12 下有此错误,但在 3.10 PyCharm 解释器下没有。


0
投票

如果您碰巧在 fastApi 中遇到此错误,您可以禁用重新加载来启动它,断点将再次起作用

 uvicorn.run("bootstrap:app", host="0.0.0.0", port=8080, reload=False)

更新 pycharm 或将 python 降级到 3.10 也可以

© www.soinside.com 2019 - 2024. All rights reserved.