I am using Visual code for python development but somehow I am not able to show compile time error during python development.
I will get those errors only after run.
I have uninstalled visual code 3 times but still not able to solve it.
I am using Visual code for python development but somehow I am not able to show compile time error during python development.
I will get those errors only after run.
I have uninstalled visual code 3 times but still not able to solve it.
There's a few things that need to be in place before VS Code can give you the live feedback you're after.
ms-python.python
but there seem to be some alternatives available. Ctrl+Shift+X
will get you to the extensions panel where you can search for Python
and check that you've got something installed.Select language mode
. If this doesn't already say "Python", click on it and change it to Python. If you can't find Python, this probably indicates you don't have a Python language extension installed.pylint
installed. For me, when I selected the Python 3.7.3 32 Bit
interpreter, Code popped up a warning about pylint not being installed. Clicking the button to install it didn't work; but I was able to slightly tweak the commandline it tried to C:/Users/jamez/AppData/Local/Programs/Python/Python37-32/python.exe -m pip install -U pylint --user
.Once I did that, Code is able to give me live feedback - I get red squigglies under "from xyz" and hovering over it lets me know that the problem is "Unable to import xyz"
You can enable Python linting by following the steps here: https://code.visualstudio.com/docs/python/linting
© 2022 - 2024 — McMap. All rights reserved.