-
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
Select Interp - Says Python not installed #20339
Comments
What happens when you try to run that path manually in the terminal? And can you check the Output panel for what the error is when we try to run that interpreter to get information about it? |
Manually from terminal has no issues. The Output window is always blank. If I delete the Code folder, start VSC from scratch, then browse to my python install, this is the pop-up I get: This is my settings file: I can see VSC saying "detecting python interpreters" in the bottom, left corner when I start VSC. I reviewed the various log files I could find and didn't see anything that seemed relevant to this issue. |
Data from Output with Python channel selected. Data from Output with Python Language Server selected |
I see the issue in your logs from the Output channel:
So when we ask Node to try and run the interpreter we are told it can't be found (the Can I ask why you hard-coded the path to your interpreter? If this a Microsoft Store install then there's quirky things where we have to use a different path that we will find automatically. And if this is an install from python.org, we will find it via your Registry. |
This is a python install from python.org. I browsed manually via, enter interpreter path, as a test trying to get VSC to see python. I can uninstall both, delete whatever folders you want, install python into C:\python311, or anything else you want to try. |
We are probably not "finding" it for the same reason specifying it manually isn't working: when we try and run the binary, Node gives us a Are the permissions in any way odd on the binary or directory? I also noticed that when you tested this in a terminal you didn't use
|
All the file/folder permissions look fine. The response from the terminal command is interesting. PS correctly resolved the ~ for the python exe path, but the passed in extension path says "\dave\~\.vscode\". I'm guessing the ~ in the folder path is causing the file not found error? If I take out the ~ in the command line args and replace with the full path, the command works |
Essentially the ENOENT (-4058) error with -c " " error usually means that Node exec tried to get default shell on Windows using |
You want only that in my comspec? I had the exe in there previously as
shown in the earlier post. I took it out as a test for the cmd test.
…On Tue, Dec 13, 2022, 4:30 AM Kartik Raj ***@***.***> wrote:
Essentially the ENOENT (-4058) error with -c " " error usually means that
Node exec tried to get default shell on Windows using ComSpec and since
ComSpec was wrong it was failing while trying to shell execute python
commands.
—
Reply to this email directly, view it on GitHub
<#20339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKTJ5WWX3D6LJ24LIBU4GJ3WNBT7BANCNFSM6AAAAAASV2OC5M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, AFAIK the env variable is not supposed to be used that way. |
Will fix when I get home. I saw that fix in another closed ticket but didn't realize it was supposed to be the only thing in ComSpec. Unknown how that machine got that way. I just checked 5 other machines at the office and they all have comspec set to just the cmd.exe path. |
Of course that fixed the issue. Sorry about that, I hate wasting time on issues where a fix is already available. Hopefully the older ticket and this ticket will help someone else realize that comspec should only have the path to the default shell |
Awesome. With #16692 we can show a prompt to the user instead so they need not rely on searching through tickets. Closing this. |
Type: Bug
I've done everything in the other closed bug reports for this issue. Full unistall and reinstall of both python and VSC. Deleted the code folder to fully reset VSC. Used the default install paths for both. py -0 from the VSC terminal shows V 3.11.
If I manually browse to my python exe in the Select Interpreter GUI, VSC says an invalid interpreter has been selected.
My path and other environment variables look correct.:
env.txt
VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No
Extensions (8)
A/B Experiments
The text was updated successfully, but these errors were encountered: