Cursor 0.46.0 adds $PYTHONHOME to env with wrong value

Version:

➜ echo $PYTHONHOME
/tmp/.mount_cursoroNCRSv/usr/

When I look into $PYTHONHOME, it is a wrong value. It breaks lots of things starting from python

➜ python3
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007d4192a78740 (most recent call first):
  <no Python frame>

Please fix this. Thank you.

17 Likes

Version: 0.46.0
VSCode Version: 1.96.2
Commit: aff57e1d9a74ed627fb5bd393e347079514436a0
Date: 2025-02-21T04:49:24.841Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Linux x64 5.10.0-23-amd64

env | grep PYTHONHOME
PYTHONHOME=/tmp/.mount_cursorhmX5gQ/usr/

Download and install again from the official website, do not use the check for update feature in the IDE to update

2 Likes

But that downgrades cursor. Any workaround that would let us keep 0.46.0?

There is definitely something wrong with how paths are handled. I managed to solve it in the launcher, but today I hit the issue with python too and I am a bit afraid much more things got broken, waiting to be discovered.

This didn’t work for me…

1 Like

Good workaround here:

export “PYTHONHOME=”

you can also add it to your launch config

{
    "configurations": [
        {
            ...
            "env": {
               ...
                "PYTHONHOME": ""
            }
        }
    ]
}
2 Likes

For me the only workaround that worked was downgrading.

This comment has a link to the 0.45.14 appimage which fixes it

In Linux, I managed to fix this by rolling back to version 0.45.14 (I had the same issues even with 0.45.15, not only 0.46). I also used the script kindly provided by @Kirai and made a few modifications to make it work in Wayland (added the --ozone-platform=wayland option). For details see Installing command line launcher on Linux - #6 by Kirai

For Version Download Links see GitHub - oslook/cursor-ai-downloads: all cursor ai version download links, and some older versions offer a better user experience