Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

By running:

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)

i receive an alert and an error:

-------------------------------------------------------------------------------
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

I have installed Python 3.11.0 using Pyenv on Mac OS X 12.6.1, with PyCharm 2022.2.3 by setting the interpreter.

(https://i.sstatic.net/8uokr.png)

Previously i was using Python 3.10 by a simple installation, but yesterday i have installed Python 3.11 using pyenv because i was having a problem in importing a dataset from sklearn.

I checked the frameworks.python folder and this is the output

(https://i.sstatic.net/9FPYp.png)

like image 366
Alessio Bolpagni Avatar asked Sep 13 '25 16:09

Alessio Bolpagni


2 Answers

I had a similar problem; updating PyCharm to 2022.3 fixed the issue for me.

like image 134
mhilden Avatar answered Sep 15 '25 07:09

mhilden


This is an issue with the bundled version of pydev.debugger.

You can fix it by adding -Xfrozen_modules=off in the "Interpreter options:" field of the Run/Debug window.

Screenshot

For more background, check out the GitHub issue.

like image 43
Chris May Avatar answered Sep 15 '25 06:09

Chris May