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?
Kirai
February 22, 2025, 7:28am
5
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.
asarama
February 24, 2025, 3:27am
7
Good workaround here:
opened 11:41PM - 21 Feb 25 UTC
> NOTE: We will try our best to check Github Issues, but [forum.cursor.com](http… s://forum.cursor.com/) is our main site for bug reports / user feedback. We'd recommend you post there for the fastest response.
ACK: I will post this on the forums as well, its pretty critical in the Linux Build.
EDIT: On the forums: https://forum.cursor.com/t/python-environment-issues-on-linux-appimage/53002
EDIT EDIT: The forum link is dead due to the spam filter banning my account from making any posts over cross posting this.


EDIT EDIT EDIT: Got banned from the forums over reporting this issue for 24 hours.

EDIT X4: e-mailed this issue link to `hi@cursor.com` to ensure visibility.
EDIT X5: Tweeted on X: https://x.com/saber7ooth/status/1893093369544614281 tagigng cursor_ai's account.
## Here's the bug report:
```
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 6.8.0-1020-oem
```
```
Python path configuration:
PYTHONHOME = '/tmp/user/1000/.mount_cursorBLFrdY/usr/'
PYTHONPATH = '/tmp/user/1000/.mount_cursorBLFrdY/usr/share/pyshared/:'
program name = '/usr/bin/python3'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/tmp/user/1000/.mount_cursorBLFrdY/usr/lib/python3.12'
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/tmp/user/1000/.mount_cursorBLFrdY/usr/'
sys.base_exec_prefix = '/tmp/user/1000/.mount_cursorBLFrdY/usr/'
sys.platlibdir = 'lib'
sys.executable = '/usr/bin/python3'
sys.prefix = '/tmp/user/1000/.mount_cursorBLFrdY/usr/'
sys.exec_prefix = '/tmp/user/1000/.mount_cursorBLFrdY/usr/'
sys.path = [
'/tmp/user/1000/.mount_cursorBLFrdY/usr/share/pyshared',
'/home/saber7ooth/Documents/repos/comfyg',
'/tmp/user/1000/.mount_cursorBLFrdY/usr/lib/python312.zip',
'/tmp/user/1000/.mount_cursorBLFrdY/usr/lib/python3.12',
'/tmp/user/1000/.mount_cursorBLFrdY/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 0x000078a6d9b58740 (most recent call first):
<no Python frame>
```
Happens when doing anything related to `npm`. Running `cursor .` also ends me up in the AppImage's virtual directory after putting cursor into `/opt/cursor` and adding that to PATH with my usual `~/.bashrc` alias. This did not occour prior to updating to 0.46.0:
Here's that portion of `~/.bashrc`:
```bash
cursor() {
# Run the cursor command and suppress background process output completely
(nohup /opt/cursor/cursor.AppImage --no-sandbox "$@" >/dev/null 2>&1 &)
}
```
I use the usual `nohup` trick to avoid the AppImage forking itself into the foreground/taking over the terminal process. Again, nothings changed, and this worked before the update.
export “PYTHONHOME=”
you can also add it to your launch config
{
"configurations": [
{
...
"env": {
...
"PYTHONHOME": ""
}
}
]
}
2 Likes
czue
February 24, 2025, 3:24pm
8
For me the only workaround that worked was downgrading.
This comment has a link to the 0.45.14 appimage which fixes it
serghei
February 24, 2025, 4:18pm
9
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