Just in case it speeds up the process of troubleshooting, you might want to paste system info from:
Cursor > Help > About.
And a few more troubleshooting questions:
Are you using Interpreter Mode in Ctrl + L when you see this message?
Do you have Python installed on your system?
If so, which version?
Do you have these extensions from Microsoft installed?
Python from ms-python
Jupyter from ms-toolsai
I had quite a bit of trouble getting Interpreter Mode to work when I first started using Cursor, so Iām aware it requires you to be really clear about what Python version you have installed, and whether you have the required extensions installed and configured properly etc.
Also struggling with this and finding myself go back to VSCode so that i can jump to definition and get the amazing syntax highlighting iām used to from Pylance.
I use direnv for managing python environments and that all works perfectly fine in VSCode.
I was having problems with the interpreters doing being discovered. All I had to do was to switch the jupyter (ms-toolsai) to pre-release and then it was able to find my interpreters.
So I was having this issue on one user on my machine and not another. Turned out that cursor was installing the universal versions of the python extensions in the broken profile and the darwin-arm64 versions in the one that works fine.
Still trying to identify how you can force darwin-arm64 versions.
Check your ~/.cursor/extensions folder. If you have the universal version of Python and not the darwin-arm64 version, this is probably what is causing the problem.
I saw a lot of old python versions in my ~/.pyenv, so i went and deleted everything older than 3.11 and now itās all working nicely and no longer stuck on āDiscovering Python interpretersā
I never directly use these pyenv versions in Cursor/VSCode (i always use a venv or direnv), so was surprised this worked, but it did!
I also got hit by this and had to take a couple of additional steps to get this sorted. This is on an M1 Mac.
Started with fresh install, with extensions set up from scratch. Then āDiscovering Python Interpretersā got stuck as soon as I installed the Python extension.
I had a few different Python versions installed via homebrew and pyenv but after reading the thread removed everything apart from the ones actually in use: 3.11 (installed via pyenv) and 3.12 (installed via homebrew).
This didnāt solve the issue.
I also had a number of virtual environments set up via pipenv, and I knew that some of these would be linked to old (now uninstalled) versions of Python. So I deleted any dead symlinks by running
find ~/.local/share/virtualenvs -type l -name "python" ! -exec test -e {} \; -exec rm {} \;
This last part got the āDiscovering Python Interpretersā process to finally run successfully.
A couple of notes:
you can replace -exec rm {} \; with -print to simply show the dangling symlinks
if youāre feeling braver you can also replace it with -exec with -execdir sh -c 'rm -rf "$(dirname "$(pwd)")"' \; in order to delete each of the outdated virtualenvs entirely, not just the dangling python symlinks
doing this kind of cleanup was fine in my case since I use pipenv and the contents of each virtual environment are defined elsewhere, meaning I could easily recreate any that Iām actually using. But anyone who has hand-crafted environments should obviously proceed with caution