Repository navigation
Jedi InvalidPythonEnvironment error #22659
Copy link
Copy link
Closed
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Type: Bug
Steps to reproduce:
- In our CI, we get symbols from the python extension using this
vscode.commands.executeCommand<vscode.DocumentSymbol[]>('vscode.executeDocumentSymbolProvider', document. uri)
- After we get the error
jedi.api.environment.InvalidPythonEnvironment: bin/python seems to be missing.: Error: jedi.api.environment.InvalidPythonEnvironment: bin/python seems to be missing.
- This was NOT throwing the error in
2023.20.0and before, but STARTED in2023.22.0and still does it with the latest version (2023.22.1) - The jedi error comes from here
Diagnostic data
- Python version: 3.10
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): don't think we are explicitly using any
- Value of the
python.languageServersetting: Default
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
User Settings
languageServer: "Pylance"
Extension version: 2023.22.1
VS Code version: Code 1.85.0 (Universal) (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T18:18:04.614Z)
OS version: Darwin arm64 22.6.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 9, 8, 7 |
| Memory (System) | 32.00GB (0.06GB free) |
| Process Argv | --crash-reporter-id 57a1edb2-7321-4da4-8ac4-0dac8475ab2b |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
2e4cg342:30602488
f6dab269:30613381
2i9eh265:30646982
showlangstatbar:30737416
962ge761:30917236
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30910334
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
karthiknadig commentedon Dec 16, 2023
Can you share the logs from Output > Python?
toddhow commentedon Dec 23, 2023
I'm getting a similar error, I'm not sure where its getting
Scripts\python.exethough. My python executable iscurrent\python.exe.toddhow commentedon Dec 23, 2023
Lines 370-383 of
/jedi/api/environment.pymieky commentedon Dec 27, 2023
Can confirm this issue does not exist in the older 2023.20.0. For anyone looking for a quick fix, you can downgrade to this version: Extensions > Python > Settings > Install Another Version > 2023.20.0.
karthiknadig commentedon Jan 3, 2024
This was introduced in #22466 . We should change that to pass executable instead of the environment directory. It looks like Jedi does not handle Conda like environments.
Fix for issue with environment path and Jedi (#22713)
lmerynda commentedon Feb 1, 2024
When is the new release planned to address this problem? It seems silly to keep telling people they need to revert to the previous version, while the fix has been in the maintrack for almost a month. If the actual release is too far ahead could it be released as a bugfix instead?
karthiknadig commentedon Feb 1, 2024
We have a pinned issue that provides the release dates see here: #22669
you can also use the pre-release version to try out the latest.
lmerynda commentedon Feb 1, 2024
Awesome! Thank you for your great work, I will try the pre-release version with our env setup to confirm it is fixed indeed :)
rupurt commentedon Feb 5, 2024
I ran into this on Nix. I need to build a custom version of the python interpreter that links to
libstdc++formanylinuxdependencies. Not sure how to work around it?Merged PR posit-dev/positron-python#347: Merge upstream release v2024…
Merged PR posit-dev/positron-python#347: Merge upstream release v2024…