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:
- Cursor AppImage on Linux ignores virtual environments and uses the wrong Python interpreter — the suggested workaround is to switch the integrated terminal to bash. This is not an acceptable solution: users should not be forced to change their shell to make a basic Python feature work. I use zsh and I want to keep using zsh.
- Cursor AppImage ignores Python virtual environment when using zsh, defaults to bundled Python — this thread describes the exact same issue and was closed without any resolution.
Steps to Reproduce
Steps to Reproduce
-
Use Cursor AppImage on Linux with zsh as the default integrated terminal shell.
-
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
- Open the project in Cursor:
cursor .
- 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
- Try importing the installed package:
python3 -c "import httpx; print(httpx.__version__)"
# ModuleNotFoundError: No module named 'httpx'
- 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
- 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