Cursor terminal doesn't respect pyenv version management [by default]

Environment:

  • macOS 15.2 (24C101)
  • pyenv 2.5.5-2-gee40ad22
  • zsh 5.9 (arm64-apple-darwin24.0)
  • cursor 0.49.6 0781e81[…] arm64

Issue:
When using pyenv global 3.13.3, Cursor’s terminal shows Python 3.11.5 instead. The same command works correctly in both macOS Terminal and VS Code.

Examining the PATH in Cursor’s terminal shows:

  • Multiple duplicate entries for .pyenv/shims
  • The specific Python version (3.11.5) appears multiple times
  • The pyenv shims are not properly prioritized in the PATH

Related:

Workarounds:

  • A. Running this command in Cursor’s terminal fixes the issue (until Cursor is restarted):

    export PATH="$HOME/.pyenv/shims:$PATH"
    
  • B. Use “Python: Select Interpreter” command. Ref: 1, 2. And then open new terminal.

I think Workaround B (use “Python: Select Interpreter” command) might be a proper fix. But, I do find it interesting that VS Code does not require me to choose Interpreter. VS Code “just works” (like macOS Terminal).

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