Spent way too long and used credits just to actually work on something. Didnt have this issue yesterday. Look at the screenshots for explanation. I’m sure Claude explains better than I would. I’m currently working in a bypass environment to get around the issue.
Cursor version 0.45.15 - Linux
Posted this in the pre-release thread, but since that’s now closed I will cross post here in case it helps some people, pending a fix:
I am also seeing issues related to Python on v0.46.3, which I just upgraded to. I am a Linux user. My IDE setup stopped working properly, e.g. attempts to run a python script in the IDE terminal led to
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007699a9e47b80 (most recent call first):
<no Python frame>
Following advice from other commenters, I resolved the issue for the short term by running (N.B. I don’t usually have $PYTHONHOME
set to anything) unset PYTHONHOME
. However, extensions are still having some problems.
The $PYTHONHOME
variable was pointing at /tmp/.mount_cursor...[etc]
and, the pyshared/
subdirectory $PYTHONPATH
was pointing to within this location does not actually exist. I had to unset the variable to restore some functionality, but am still having problems with various extensions.
This is getting extremely annoying.
(bypass_env) ➜
Python path configuration:
PYTHONHOME = ‘/tmp/.mount_cursorDQga5m/usr/’
PYTHONPATH = ‘/tmp/.mount_cursorDQga5m/usr/share/pyshared/:’
program name = ‘/home/sizzlebop/Desktop/current-projects/cliche/bypass_env/bin/python3’
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = ‘/tmp/.mount_cursorDQga5m/usr/lib/python3.12’
sys._base_executable = ‘/home/sizzlebop/Desktop/current-projects/cliche/bypass_env/bin/python3’
sys.base_prefix = ‘/tmp/.mount_cursorDQga5m/usr/’
sys.base_exec_prefix = ‘/tmp/.mount_cursorDQga5m/usr/’
sys.platlibdir = ‘lib’
sys.executable = ‘/home/sizzlebop/Desktop/current-projects/cliche/bypass_env/bin/python3’
sys.prefix = ‘/tmp/.mount_cursorDQga5m/usr/’
sys.exec_prefix = ‘/tmp/.mount_cursorDQga5m/usr/’
sys.path = [
‘/tmp/.mount_cursorDQga5m/usr/share/pyshared’,
‘/home/sizzlebop/Desktop/current-projects/cliche’,
‘/tmp/.mount_cursorDQga5m/usr/lib/python312.zip’,
‘/tmp/.mount_cursorDQga5m/usr/lib/python3.12’,
‘/tmp/.mount_cursorDQga5m/usr/lib/python3.12/lib-dynload’,
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’
Current thread 0x00007ad431a6b740 (most recent call first):
Debugging and terminal use of python is totally broken for me too. just fine in VS Code. Think I saw somewhere else here this started breaking between 0.45 and 0.46
Got the same problem, it makes anything after 0.45.14 unusable. You can’t really tell the LLM to use it every time because he’ll often forget to do so. Using newest version of ubuntu.