Syntax not working until I change interpreter path
See original GitHub issueEnvironment data
- VS Code version: 1.54.0-1614738615.el7.x86_64
- Extension version (available under the Extensions sidebar): python:v2021.2.582707922, jupyter:v2021.3.619093157
- OS and version: fedora 33
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.2, /bin/python
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): none
- Relevant/affected Python packages and their versions:none
- Relevant/affected Python-related VS Code extensions and their versions: none
- Value of the
python.languageServer
setting: “Pylance” version:v2021.3.0
Actual behaviour
Python syntax not working not working until I change python interpreter path.
Steps to reproduce:
- starts vscode: python syntax not working. Outline box is empty.
- change python interpreter path (/usr/bin/python to /bin/python or otherway around) syntax works, outline box lists my variable.
Settings.json files like this:
{ “python.linting.enabled”: true, “python.linting.lintOnSave”: true, “python.linting.pylintEnabled”: true, “python.languageServer”: “Pylance” }
I tried Jedii, JediLSP and microsoft. All behaviour is same.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
cannot detect and python interpreters · Issue #5455 - GitHub
Install VS Code; Install python extension; Try to set the interpreter(none is found and 'hardcoding' it does not seem to have any effect)....
Read more >Using Python environments in VS Code
To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
Read more >Invalid Syntax in Python: Common Reasons for SyntaxError
When the interpreter encounters invalid syntax in Python code, it will raise a SyntaxError exception and provide a traceback with some helpful information...
Read more >Configure a Python interpreter | PyCharm Documentation
You can modify the path to the Python executable in the Interpreter path field. To change the interpreter name, select the target interpreter...
Read more >Manage Python environments and interpreters - Visual Studio ...
Install Python interpreters and packages and assign environments to ... it doesn't provide a way to change it from within Visual Studio.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@karthiknadig It’s working now. Issue was I forgot “},” for pylint area I assume. Thanks!
@yusyel replace your entire settings file with the content below. It does not follow the expected JSON syntax.