Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Pylance not working

Open adamhuang03 opened this issue 1 year ago • 26 comments

Before opening, please confirm:

Operating System

darwin

Kiro Version

0.1.25

Bug Description

I cannot have pylance linter working, which makes the experience finding issues in the code pretty bad after I use the agent to kickstart my project

Steps to Reproduce

Open Kiro

Expected Behavior

I expect the linter to be working.

Conversation ID

No response

Additional Context

KIRO: Image

vs.

Other: Image

adamhuang03 avatar Jul 24 '25 02:07 adamhuang03

pylance extension is not in the open vsx, install the ms-python and add a language server like jedi.

mjkubba avatar Jul 24 '25 15:07 mjkubba

@mjkubba i've done so

it will prompt me to install pylance, which i do.

after which, nothing else changes, even if I restart the language server and update the server to pylance.

Image Image

adamhuang03 avatar Jul 24 '25 16:07 adamhuang03

That is the issue, you cannot install pylance extension, after you click install, do you see it in your extension list?
another place to check, open your outputs (shift+command+U) and switch to Extension host, you'll see the error, the Python extension try to install the Pylance but it can't find it, since Kiro (and other forks) uses https://open-vsx.org/

Image

mjkubba avatar Jul 24 '25 18:07 mjkubba

Hi @adamhuang03 did the response from @mjkubba help you out? Let me know if you have other questions, otherwise I will close out this issue. Thanks!

nadetastic avatar Jul 25 '25 02:07 nadetastic

@adamhuang03 Hey, did you manage to solve this problem? I think I am facing pretty much similar issue now.

nkorgik avatar Jul 28 '25 16:07 nkorgik

Did you manage to solve it? I tried a few things but didn't work. Tried downloading the vsix file but it was complaining that it's not compatible with VSCode version 1.94.0. I checked Help > About and indeed my version of Kiro is based on VSCode 1.94.0 so I donwloaded an older version of pylance vsix but now the output for Python Language Server shows some licensing message. I've uninstalled it now and don't remember what it said but basically outlined that pylance should only be used by VSCode, Visual Studio and a couple of other IDE's. Kiro and Cursor were not mentioned though. I thought Kiro was built in a similar way as Cursor (from vscodium). But Cursor can see Pylance in the extensions. I do see that Cursor is built of a newer version of VSCode though (mine is off 1.99.3). Not sure if that's the reason though.

budaesandrei avatar Jul 31 '25 11:07 budaesandrei

I have Kiro 0.2.0 with VSCode version 1.94.0 but still pylance doesn't show up in the extension search. I tried to force install it by the vscode files and it said the current version is incompatible-makes sense.

HoseynAAmiri avatar Aug 12 '25 01:08 HoseynAAmiri

I also have the same issue. Without this, it's hard to navigate the code and make the development overall hard. +10 to prioritize this.

gauravdhiman avatar Aug 15 '25 23:08 gauravdhiman

Pylance Only Shows License Agreement in Restricted Environment

Environment Details: • VS Code Version: 1.94.0 (Kiro IDE - restricted environment) • Pylance installed but non-functional • Language Server Output only shows Microsoft license text

Actual Language Server Output: 2025-08-19 08:36:50.617 [info] (Client) 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...

Symptoms: • No IntelliSense or code completion • No error checking or type hints • No Go to Definition functionality • Language server appears "running" but provides no language features • Only license agreement messages in output logs

Current Workaround: Using Jedi language server which works but has significant limitations: • No inlay hints for variable/return types • Limited modern Python typing support • Reduced IntelliSense capabilities

Issue Analysis: This appears to be different from a typical crash - Pylance seems to start but gets stuck displaying license information instead of providing language server functionality. This may be related to restricted environment policies or licensing validation issues.

Request: Either fix Pylance's behavior in restricted environments, or enhance Jedi integration to support modern Python development features as a viable alternative.

eyals24 avatar Aug 19 '25 05:08 eyals24

switch to pylance v2023.10.40 and python v2023.4.1 works well

dxsooo avatar Aug 19 '25 10:08 dxsooo

same, quite sad T_T

674019130 avatar Aug 22 '25 01:08 674019130

Same issue still, it's a HUGE hurdle and I constantly have to switch back to vscode for python codebases.

MoPoRem avatar Aug 28 '25 08:08 MoPoRem

switch to pylance v2023.10.40 and python v2023.4.1 works well

This worked for me, although the highest Pylance version I could find that did not have the license error was v2023.10.21, link here if anyone else needs it: https://www.vsixhub.com/vsix/127208/

kiro --install-extension ./vscode-pylance-2023.10.21_vsixhub.com.vsix

markschad avatar Sep 20 '25 08:09 markschad

switch to pylance v2023.10.40 and python v2023.4.1 works well

this worked. thanks. I was getting annoyed with Pyright

budaesandrei avatar Oct 01 '25 13:10 budaesandrei

Any update on this? I'm surprised there hasn't been more feedback, Jedi is totally unusable. Maybe there's not many python devs using Kiro?

markschad avatar Oct 28 '25 02:10 markschad

I'm having the same issue and can't find a solution either. With Pylance v2023.10.40 and Python extension v2023.4.1, there are lots of squiggly underlines appearing, which feels really annoying. Are there any other good alternatives or workarounds?

zhanghaoyuan616 avatar Nov 13 '25 10:11 zhanghaoyuan616

Here's how I solved it. Hope this helps.

Kiro > Extensions > Python > Gear icon (Settings) > Install Specific Version... > Select 2023.4.1 > Install

This will enable Pylance in the Kiro environment.

nomber21 avatar Dec 02 '25 01:12 nomber21

+1 on this. Nothing seems to work, not even Jedi.

l-antonelli-ryz avatar Dec 17 '25 13:12 l-antonelli-ryz

Just use one of those pyright extensions, it's on par with pylance!

HoseynAAmiri avatar Dec 17 '25 13:12 HoseynAAmiri

Just use one of those pyright extensions, it's on par with pylance!

I tried this many times and didn't work. Went through the kiro docs, didn't find anything helpful. Tried a bunch of different things but the only thing that worked for me is (echoing off of what others said here):

  1. Python Extension -> Install Specific Version -> 2023.4.1
  2. Download Pylance .vsix 2023.10.21 version from vsix hub
  3. Run kiro --install-extension /path/to/file/vscode-pylance-2023.10.21_vsixhub.com.vsix
  4. Might already be set but go to settings and set language server to Pylance

This is the only thing that worked for me. Still, seems like a pretty big flaw that should get resolved, or at least clear instructions for getting other Language Servers for python working, which I also couldn't setup.

l-antonelli-ryz avatar Dec 17 '25 15:12 l-antonelli-ryz