【问题标题】:pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)pydev 调试器:严重警告:此版本的 python 似乎未正确编译(内部生成的文件名不是绝对的)
【发布时间】:2022-12-18 09:20:31
【问题描述】:

通过运行:

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。

以前我通过简单安装使用 Python 3.10,但昨天我使用 pyenv 安装了 Python 3.11,因为我在从 sklearn 导入数据集时遇到问题。

我检查了 frameworks.python 文件夹,这是输出

【问题讨论】:

  • 我对 Python 3.11 有同样的问题,我想它可能与当前的 PyCharm/pydev 版本不兼容。
  • 尝试以下操作: 在“项目”窗格(通常是左侧)中,右键单击树顶部的项目名称并选择“清理 Python 编译文件”。看看是否有帮助。

标签: python scikit-learn pycharm pyenv macos-monterey


【解决方案1】:

我遇到了类似的问题;更新 PyCharm t0 2022.3 为我解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-09
    相关资源
    最近更新 更多