AppImage on Linux + zsh: Python virtual environment is ignored, bundled Python is used instead

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Describe the Bug

On Linux, the Cursor AppImage does not respect Python virtual environments when using zsh as the integrated terminal shell. Instead of using the venv’s Python interpreter, Cursor silently substitutes its own bundled Python embedded in the AppImage.

This causes sys.executable to point to the AppImage path instead of the venv’s bin/python, and sys.path does not include the venv’s site-packages. As a result, any package installed in the virtual environment (e.g. httpx) cannot be imported, failing with ModuleNotFoundError.

This issue has already been reported in two separate threads, neither of which has received an official fix:

Steps to Reproduce

Steps to Reproduce

  1. Use Cursor AppImage on Linux with zsh as the default integrated terminal shell.

  2. Create a project with a virtual environment and install a package:

mkdir test-cursor && cd test-cursor
python3 -m venv .venv
source .venv/bin/activate
pip install httpx
  1. Open the project in Cursor:
cursor .
  1. In the integrated terminal (zsh), activate the venv and verify:
source .venv/bin/activate
which python3
# Shows: /path/to/test-cursor/.venv/bin/python3  ← looks correct
  1. Try importing the installed package:
python3 -c "import httpx; print(httpx.__version__)"
# ModuleNotFoundError: No module named 'httpx'
  1. Check what Python is actually being used:
python3 -c "import sys; print('executable:', sys.executable); print('path:', sys.path)"
# executable: /home/user/.local/share/applications/Cursor-x.x.x-x86_64.AppImage  ← WRONG
# path does NOT contain .venv/lib/python3.x/site-packages
  1. Switch the integrated terminal to bash and repeat steps 4-6: everything works correctly.

Expected Behavior

When a Python virtual environment is activated in the integrated terminal, python3 should use the venv’s interpreter regardless of which shell (bash, zsh, fish, etc.) is configured. The shell choice should have no effect on Python interpreter resolution.

sys.executable should point to .venv/bin/python3, and sys.path should include .venv/lib/python3.x/site-packages, so that packages installed in the venv are importable.

Operating System

Linux

Version Information

Linux Mint 22.3 (kernel 6.8.0-110-generic, x86_64)
Cursor 3.2.11 (AppImage)
Default shell: zsh

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

This is a known bug with the Cursor AppImage on Linux. I reproduced it and identified the root cause.

The quickest fix is to add this to your ~/.zshrc:

if [[ -n "$APPIMAGE" ]]; then
unset ARGV0
fi

Alternatively, you can add this to your Cursor settings.json (Ctrl+Shift+P > “Preferences: Open User Settings (JSON)”):

"terminal.integrated.env.linux": {
"ARGV0": ""
}

Either option should restore normal venv behavior without switching to bash. We’ve filed this with our infrastructure team so it can be fixed at the source.

Let me know if either workaround resolves it for you!