# Cursor AppImage ignores Python virtual environment when using zsh, defaults to bundled Python

**URL:** <https://forum.cursor.com/t/cursor-appimage-ignores-python-virtual-environment-when-using-zsh-defaults-to-bundled-python/123602>\
**Category:** Bug Reports\
**Created:** [July 28, 2025, 5:42pm UTC](https://forum.cursor.com/t/cursor-appimage-ignores-python-virtual-environment-when-using-zsh-defaults-to-bundled-python/123602 "2025-07-28T17:42:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![javohirmx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/javohirmx/32/73554_2.png) [@javohirmx](https://forum.cursor.com/u/javohirmx)\
**Post date:** [July 28, 2025, 5:42pm UTC](https://forum.cursor.com/t/cursor-appimage-ignores-python-virtual-environment-when-using-zsh-defaults-to-bundled-python/123602/1 "2025-07-28T17:42:30Z")

</div>

### Describe the Bug

When using zsh as the default shell, Cursor AppImage ignores configured Python virtual environments and always uses its bundled Python interpreter (/opt/cursor.appimage).  
Switching to bash makes Cursor correctly respect the venv.

This suggests a Cursor vs zsh compatibility issue on Linux.

### Steps to Reproduce

1. Create a new project folder and set up a venv:

2. Create `.vscode/settings.json`:

3. Open the folder in Cursor (AppImage build) with **zsh** as the integrated shell.

4. Run inside Cursor:

5. Observe that `sys.executable` is `/opt/cursor.appimage`, not the `.venv` interpreter.

6. Switch integrated shell to **bash** and repeat step 4:

* * *

### Expected Behavior

Cursor should respect `"python.defaultInterpreterPath"` and use the project’s `.venv/bin/python`, regardless of the integrated shell.

* * *

### Actual Behavior

- With **zsh** : Cursor always uses `/opt/cursor.appimage` and ignores `.venv`.
- With **bash** : Cursor correctly uses `.venv/bin/python`.
- Integrated terminal activates `.venv`, but code execution still runs via the bundled Python.

* * *

### Operating System

Linux

### Current Cursor Version (Menu → About Cursor → Copy)

- Cursor: 1.2.4
- VSCode Core: 1.99.3 (commit a8e95743c5268be73767c46944a71f4465d05c90)
- Electron: 34.5.1
- Chromium: 132.0.6834.210
- Node.js: 20.19.0
- V8: 13.2.152.41-electron.0
- OS: Ubuntu 24.04.2 LTS x64 (Linux 6.14.0-24-generic)
- Python in project venv: 3.12.3
- Default shell: **zsh** (`/usr/bin/zsh`)

* * *

### Additional Information

* * *

### Quick Diagnostic Section

Run inside Cursor (zsh):

```python
import sys, pathlib, os
print("Executable:", sys.executable)
print("In venv?", ".venv" in pathlib.Path(sys.executable).parts)
print("PATH:", os.environ.get("PATH"))
print("VIRTUAL_ENV:", os.environ.get("VIRTUAL_ENV"))

```

Then repeat in bash.  
Difference: with bash, `sys.executable` uses `.venv/bin/python`; with zsh, it falls back to `/opt/cursor.appimage`.

* * *

### Workarounds Tried

- Setting `"python.defaultInterpreterPath"` and `"python.venvPath"`.

- Enabling `"python.terminal.activateEnvironment": true`.

- Activating `.venv` manually in integrated terminal.

- Restarting Cursor and OS.

- Hardcoding venv path in `.vscode/settings.json`.

- Running Cursor with `PATH` modified to include `.venv/bin` first.

- Verified venv works correctly in external terminal (`sys.executable` points to `.venv/bin/python`).

- **Changing integrated shell:**

* * *

### Possible Cause / Developer Notes

- Likely a **zsh-related environment inheritance issue** :

- Could be related to how AppImage launches subprocesses or differences in initialization between bash and zsh.

* * *

### Impact

- Prevents using project-specific Python packages in zsh.
- Makes Cursor inconsistent with both bash and standard VS Code behavior.
- Requires either changing shell to bash or patching Cursor startup scripts to work around.

* * *

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![LRC](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@LRC](https://forum.cursor.com/u/LRC)\
**Post date:** [August 1, 2025, 2:15pm UTC](https://forum.cursor.com/t/cursor-appimage-ignores-python-virtual-environment-when-using-zsh-defaults-to-bundled-python/123602/3 "2025-08-01T14:15:51Z")

</div>

Hi! I’m also affected by this issue. It makes cursor practically unusable for my specific case.  
How do these bug reports work? I’ve seen several threads regarding this issue and most have been automatically closed without any official reply from the Cursor team as to whether they’ve registered this as a bug or not.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [August 23, 2025, 2:16pm UTC](https://forum.cursor.com/t/cursor-appimage-ignores-python-virtual-environment-when-using-zsh-defaults-to-bundled-python/123602/4 "2025-08-23T14:16:47Z")

</div>

Closed on August 23, 2025, 2:16pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
