Skip to content
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

Error "Python is not installed." on Windows 10 #11069

Closed
matsieq opened this issue Apr 10, 2020 · 2 comments
Closed

Error "Python is not installed." on Windows 10 #11069

matsieq opened this issue Apr 10, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@matsieq
Copy link

matsieq commented Apr 10, 2020

Environment data

  • VS Code version: 1.44.0
  • Extension version (available under the Extensions sidebar): 2020.3.71659
  • OS and version: Windows 10.1809
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): the issue appears with either "python.jediEnabled": false or "python.jediEnabled": true
  • Value of the python.languageServer setting: not set

Expected behaviour

Python interpreter is set to C:\Users*******\AppData\Local\Programs\Python\Python37\python.exe

Actual behaviour

Banner "Python is not installed. Please download and install Python before using the extension. Source: Python (Extension)" pops up.
"Select Python Interpreter" warning appears on the bottom bar. When clicked, there is "current: ~\AppData\Local\Programs\Python\Python37\python.exe" grayed out

Steps to reproduce:

Appears every time after opening a Python file.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

User belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'
User belongs to experiment group 'ShowPlayIcon - start'
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> py -3.6 -c "import sys;print(sys.executable)"
> py -3.7 -c "import sys;print(sys.executable)"
> py -2 -c "import sys;print(sys.executable)"
> py -3 -c "import sys;print(sys.executable)"
> ~\AppData\Local\Programs\Python\Python37\python.exe -c "import sys;print(sys.executable)"
> conda info --json
> ~\AppData\Local\Programs\Python\Python37\python.exe -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "c:\Users\SG0217489\OneDrive - Sabre\Desktop\Untitled-1.py"
cwd: c:\Users\SG0217489\OneDrive - Sabre\Desktop
> ~\AppData\Local\Programs\Python\Python37\python.exe -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "c:\Users\SG0217489\OneDrive - Sabre\Desktop\Untitled-1.py"
cwd: c:\Users\SG0217489\OneDrive - Sabre\Desktop
##########Linting Output - pylint##########

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)



Starting Jedi Python language engine.
Diagnostic Code: NoPythonInterpretersDiagnostic, Message: Python is not installed. Please download and install Python before using the extension.

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

Error Python Extension: 2020-04-10 12:45:58: Failed to get interpreter information for 'C:\Users\SG0217489\AppData\Local\Programs\Python\Python37\python.exe' [Error: spawn C:\Windows\system32\cmd.exe;C:\Windows\SysWOW64\cmd.exe ENOENT	at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)	at onErrorNT (internal/child_process.js:456:16)	at processTicksAndRejections (internal/process/task_queues.js:77:11)] {  errno: 'ENOENT',  code: 'ENOENT',  syscall: 'spawn C:\\Windows\\system32\\cmd.exe;C:\\Windows\\SysWOW64\\cmd.exe',  path: 'C:\\Windows\\system32\\cmd.exe;C:\\Windows\\SysWOW64\\cmd.exe',  spawnargs: [    '/d',    '/s',    '/c',    '""C:\\\\Users\\SG0217489\\AppData\\Local\\Programs\\Python\\Python37\\python.exe" "c:\\Users\\SG0217489\\.vscode\\extensions\\ms-python.python-2020.3.71659\\pythonFiles\\interpreterInfo.py""'  ],  cmd: '"C:\\\\Users\\SG0217489\\AppData\\Local\\Programs\\Python\\Python37\\python.exe" "c:\\Users\\SG0217489\\.vscode\\extensions\\ms-python.python-2020.3.71659\\pythonFiles\\interpreterInfo.py"'}
@matsieq matsieq added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Apr 10, 2020
@XiaofeiQian
Copy link

I have same error on Windows 10, and find someting in [Extension Host]. Python interpreter find command:

"D:\\Programs\\Python\\venv\\rasa\\Scripts\\python.exe" "c:\\Users\\Miku\\.vscode\\extensions\\ms-python.python-2020.3.71659\\pythonFiles\\interpreterInfo.py" 

works in cmd and get:

{"versionInfo": [3, 7, 7, "final"], "sysPrefix": "D:\\Programs\\Python\\venv\\rasa", "version": "3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]", "is64Bit": true}

but it not work in pwsh(powershell 7.) or powershell(5.), it will return nothing.

If I set windows ComSpec to pwsh, and restart windows, when I open a python file by vscode it will get this Error "Python is not installed." and python: select interpreter shows nothing.

And I change ComSpec back to cmd, then restart windows, everything woks fine.

mybe we should use:

D:\\Programs\\Python\\venv\\rasa\\Scripts\\python.exe "c:\\Users\\Miku\\.vscode\\extensions\\ms-python.python-2020.3.71659\\pythonFiles\\interpreterInfo.py" 

Not Quote python.exe just the interpreterInfo.py file.

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 13, 2020
@karthiknadig
Copy link
Member

Dupe Of #10850

@ghost ghost removed the triage label Apr 13, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants