-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot select 2.7 as interpreter #20637
Comments
Seeing the same behavior on macOS but not on Windows, running the latest versions of vscode and the Python extension. Output for
|
commandline option -I is used to isolate Python from the user's environment (implies -E and -s), but it doesn't exist in python2, only in python3. It seems to me that it may be possible to replace -I option back to -E -s and see what happens |
Python extension dropped support for python 2.7 a while ago. As underlying tools and libraries we depend on move forward, it is likely that this will stop working for unsupported versions. If you need to work with python 2.7 you will have to pin to 2022.2.* version of the extension, which was the last version that had the debugger (debugpy) with support for python 2.7, and was tested with 2.7. |
@karrtikr seems to work now, but Pylance doesn't want to use 2.7 as interpreter too. I've tried most of the old versions but no luck. Recent versions always use python3, older ones say "Python version 2.7 from interpreter is unsupported". P.S. I'll be glad to move to python3, but now it's impossible - about 1M lines of code so I'm stuck with 2.7 |
@phantasm Try Jedi, set |
@karrtikr that's sad. jedi for 2.7 doesn't have intellisense so it's better to see some pylance errors than not having intellisense at all. sigh thank you for your efforts anyway! |
I understand that the only option is to move forward, and I'm at peace with not getting all of the features. But since I am maintaining Jython applications Python 2.7 is my only option. Thanks as well, @karrtikr. |
Type: Bug
Behaviour
Expected vs. Actual
Expected: select Python 2.7.18 interpreter from drop-down list (via browsing)
Actual: nothing happens and yellow button "Select interpreter" is still displayed in the status bar. Latest vscode-python version which works fine is 2022.18.2. Any recent version have this bug. I didn't notice any warnings about dropping 2.7 completely in release notes, and hope it won't happen :)
Steps to reproduce:
Try to select Python 2.7.18 interpreter from drop-down list - browse to its folder and select python.exe
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2022.18.2
VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:23:45.584Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: