簡體   English   中英

pydev 調試器:嚴重警告:此版本的 python 似乎編譯不正確(內部生成的文件名不是絕對的)

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

通過運行:

from sklearn.datasets import fetch_california_housing
import pandas as pd

pd.set_option("precision", 4)  # massimo numero di cifre decimali
pd.set_option("max_columns", 9)  # massimo numero di colonne da visualizzare
pd.set_option("display.width", None)  # larghezza caratteri sul prompt dei comandi

housing = fetch_california_housing()  # carico il dataset (http://lib.stat.cmu.edu/datasets/)
print(housing.DESCR)

我收到警報和錯誤:

-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/Users/Alessio/PycharmProjects/Chapter15MachineLearning'])
PyDev console: starting.
Python 3.11.0rc2 (main, Nov  1 2022, 14:05:44) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin
runfile('/Users/Alessio/PycharmProjects/Chapter15MachineLearning/multiLR.py', wdir='/Users/Alessio/PycharmProjects/Chapter15MachineLearning')
Traceback (most recent call last):
  File "/Users/Alessio/.pyenv/versions/3.11.0rc2/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 198, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/Alessio/PycharmProjects/Chapter15MachineLearning/multiLR.py", line 10, in <module>
    pd.set_option("precision", 4)  # massimo numero di cifre decimali
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Alessio/.pyenv/versions/3.11.0rc2/lib/python3.11/site-packages/pandas/_config/config.py", line 263, in __call__
    return self.__func__(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Alessio/.pyenv/versions/3.11.0rc2/lib/python3.11/site-packages/pandas/_config/config.py", line 156, in _set_option
    key = _get_single_key(k, silent)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/Alessio/.pyenv/versions/3.11.0rc2/lib/python3.11/site-packages/pandas/_config/config.py", line 123, in _get_single_key
    raise OptionError("Pattern matched multiple keys")
pandas._config.config.OptionError: Pattern matched multiple keys

我在 Mac OS X 12.6.1 上使用 Pyenv 安裝了 Python 3.11.0,通過設置解釋器安裝了 PyCharm 2022.2.3。

(https://i.stack.imgur.com/8uokr.png)

以前我通過簡單安裝使用 Python 3.10,但昨天我使用 pyenv 安裝了 Python 3.11,因為我在從 sklearn 導入數據集時遇到問題。

我檢查了 frameworks.python 文件夾,這是 output

(https://i.stack.imgur.com/9FPYp.png)

我遇到了類似的問題; 將 PyCharm 更新到 2022.3 為我解決了這個問題。

這是pydev.debugger捆綁版本的問題。

您可以通過在運行/調試 window 的“解釋器選項:”字段中添加-Xfrozen_modules=off來修復它。

截屏

有關更多背景信息,請查看GitHub 問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM