Vscode-python: VScode can't using python,claming python is not installed vscode

Created on 14 Jun 2020  路  4Comments  路  Source: microsoft/vscode-python


The same with #9576,have python installed and I have pythonPath set, but whenever I open a python project folder I get this popup,and vscode can't recognize my python interpreter

Environment data

  • VS Code version: 1.46.0
  • Extension version (available under the Extensions sidebar): v2020.5.86806
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3,Python 3.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi

Here is panel outpput

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - control'
User belongs to experiment group 'CollectLSRequestTiming - experiment'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
> conda --version
> pyenv root
> python3.7 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> py -3.7 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> py -3.6 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> py -3 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> py -2 c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> conda info --json
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py 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\Amtran\Desktop\Untitled-1.py
cwd: c:\Users\Amtran\Desktop
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py 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\Amtran\Desktop\Untitled-1.py
cwd: c:\Users\Amtran\Desktop
> conda env list
##########Linting Output - pylint##########
Starting Jedi Python language engine.
Diagnostic Code: NoPythonInterpretersDiagnostic, Message: Python is not installed. Please download and install Python before using the extension.
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py site --user-site
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py site --user-site
cwd: c:\Users\Amtran\Desktop\python
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\completion.py
> c:\Users\Amtran\AppData\Local\Programs\Python\Python38-32\python.exe c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\pyvsc-run-isolated.py c:\Users\Amtran\.vscode\extensions\ms-python.python-2020.5.86806\pythonFiles\completion.py
> conda info --json
info needed type-bug

Most helpful comment

First uninstall the Python plug-in, then close and reopen vscode, and finally reinstall the plug-in. It worked.

All 4 comments

First uninstall the Python plug-in, then close and reopen vscode, and finally reinstall the plug-in. It worked.

Hi @Amtran7599, thank you for reaching out.

When you say that you pave pythonPath set, do you mean in your .vscode/settings.json file? Does it appear in the status bar in the bottom left corner?

Do Anaconda3 and Python 3.8 refer to the same Python executable, or 2 different ones?

Thanks!

@kimadeline

Thanks!
well,the pythonPath set means environment varible setting.Anaconda 3 and Python 3.8 are 2 different ones.Now I reinstall both VScode and Anaconda 3 in C disc.after that It could reconginzed Anaconda 3 and Python 3.8.I don't know why.

Ok, glad to hear it works now! I'll close this issue as resolved, but feel free to leave a comment and we can reopen it if it happens again 馃檪

Was this page helpful?
0 / 5 - 0 ratings