We are going to edit cursors settings to point to the microsoft extensions marketplace.
- Remove all extensions and exit Cursor.
- Locate your Cursor
project.json
file depending on your platform and open it.- On MacOS:
/Applications/Cursor.app/Contents/Resources/app/product.json
- On Windows:
C:\Users\<user_name>\AppData\Local\Programs\cursor\resources\app\product.json
- On Linux:
/usr/lib/code/product.json
- On MacOS:
- Locate the object value for key
extensionsGallery
in the json document.
{
"galleryId": "cursor",
"serviceUrl": "https://marketplace.cursorapi.com/_apis/public/gallery",
"itemUrl": "https://marketplace.cursorapi.com/items",
"resourceUrlTemplate": "https://marketplace.cursorapi.com/{publisher}/{name}/{version}/{path}",
"controlUrl": "",
"recommendationsUrl": "",
"nlsBaseUrl": "",
"publisherUrl": ""
}
- Edit it to look like this:
{
"galleryId": "cursor",
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"itemUrl": "https://marketplace.visualstudio.com/items",
"resourceUrlTemplate": "https://{publisher}.vscode-unpkg.net/{publisher}/{name}/{version}/{path}",
"controlUrl": "",
"recommendationsUrl": "",
"nlsBaseUrl": "",
"publisherUrl": ""
}
- Reopen Cursor.app and install the following extensions:
ms-python.python
ms-python.vscode-pylance
ms-python.debugpy
- Make sure in your settings that
python.languageServer
is set to "Pylance"
Enjoy!
PS: you may need to goto your settings.json to remove any theme settings, because having a broken theme looks exactly like this same problem. In my case cursor had copied over my settings from vscode and they pointed to a theme that wasn't yet installed in cursor, removing and then setting the theme manually worked when I though for sure I had broken it again.
2025-03-24 20:03:04.650 [info] [Info - 8:03:04 PM] (934244) Pylance language server 2024.8.1 (pyright version 1.1.373, commit ee424479) starting 2025-03-24 20:03:04.650 [info] [Info - 8:03:04 PM] (934244) Server root directory: file:///root/.cursor-server/extensions/ms-python.vscode-pylance-2024.8.1/dist 2025-03-24 20:03:04.652 [info] [Error - 8:03:04 PM] Server initialization failed. 2025-03-24 20:03:04.652 [info] Message: Request initialize failed with message: You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. You may not: work around any technical limitations in the software that only allow you to use it in certain ways; reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software; remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software; use the software in any way that is against the law or to create or propagate malware; or share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.
But I still had this error and I still couldn't use pylance