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 Python Interpreter when running python prints out more than the script output #18234
Comments
I've since tried reinstalling python and troubleshooting by disabling all extensions except the python one, but it made no difference |
@irenepc Can you provide logs form Output > Python ? This can happen if the extension is not able to run the provided python to extract information about the interpreter. |
Output from just starting up vscode
and from attempting to select an interpreter
|
@irenepc Can you run these commands from command prompt (outside of vscode) and share the output?
Can you also share the values of following environment variables? |
|
I'm using a sitecustomize folder as my PYTHONPATH variable value. Whenever python is run, it prints out that message |
@irenepc Yep that is what is causing this. |
@karrtikr Does the updated interpreter check in |
Yes but we only do that when using 'conda run' right now, we should do it for all. |
@karthiknadig Should we do it for all scripts generally or just 'interpreterInfo.py'? |
For now, we should update how we do |
@karthiknadig There is another bug here, if the command errors out, I'm wondering why we're running it again and again infinitely, i.e discovery never stops? This is what is causing the list to flash and dissappear. |
Hey @irenepc 👋 Please try out the VSIX https://github.com/microsoft/vscode-python/suites/4920855469/artifacts/141949826 and let us know if it doesn't help. Use |
Ok, I'll give that a try. Thanks! |
Launched after installing the VSIX, got this output
No interpreter was selected for me. I went to select one and the list doesn't flash and flicker anymore. Choosing Python 3.7.7 as the interpreter worked and seemed to stick.
I tried using the Python: Clear Internal Extension Cache command and trying to select python27, but got the same result. |
Thanks for the logs, can you try this VSIX: https://github.com/microsoft/vscode-python/suites/4923442209/artifacts/142096276? Although do note that as Python 2.7 is now deprecated, we aren't actively supporting it anymore, I'm making an exception here. You should probably migrate to using Python3 soon. |
That's fair. Our company does a lot work with Maya so we're stuck with 27 for a little longer, but I appreciate the help! |
Issue Type: Bug
Behaviour
VS Code cannot select a python interpreter from the list of available interpreters. The list in the command flashes and dissappears.
Expected vs. Actual Behaviour
Expected vscode to set the interpreter to the selected version of python after clicking on the item.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Diagnostic data
python.languageServer
setting: DefaultUser Settings
Extension version: 2021.12.1559732655
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:40:02.816Z)
OS version: Windows_NT x64 10.0.18362
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: