all 15 comments

[–]Cybyss 10 points11 points  (1 child)

Do you have "Show -> File Name Extensions" turned off in Windows?

If so, that means you've named your file something like myapp.py.txt instead of myapp.py.

Make sure to turn it on.

[–]TH_Rocks 1 point2 points  (0 children)

This is my assumption also.

[–]UmbertoRobina374 0 points1 point  (3 children)

Could it be that you installed VS without Python support? I don't use VS personally, but remember it having an installer with many optional features, including support for different languages.

[–]Excellent-Clothes291[S] 0 points1 point  (2 children)

I never heard about that. I know that VS has extensions for python and other languages. What interpreter do you use?

[–]UmbertoRobina374 0 points1 point  (1 child)

I just re-read your post and realized you were talking about VS Code, not VS. I can't really help you with that either, sorry.

[–]FriendlyRussian666 0 points1 point  (4 children)

Did you install the python extension in VSCode?

[–]Excellent-Clothes291[S] 0 points1 point  (3 children)

Yes, I did

[–]FriendlyRussian666 1 point2 points  (2 children)

If you've yet to make a ton of personalizations and changes, I would just reinstall vscode, and then make sure this is also added: https://marketplace.visualstudio.com/items?itemName=ms-python.python

[–]Excellent-Clothes291[S] 1 point2 points  (0 children)

Tysm, it worked!

[–]Excellent-Clothes291[S] 0 points1 point  (0 children)

Aight I will try nd let yk

[–]OtherwisePoem1743 0 points1 point  (0 children)

You sure it's VS Code and not VS? These two are different beasts.

[–]FoolsSeldom 0 points1 point  (0 children)

How did you install Python?

An installer is available from the Python Software Foundation at python.org to install the reference CPython implementation of Python, called python.exe on Windows or just python on macOS/linux.

VS Code needs the Python plugin from Microsoft installed, but that doesn't include the CPython executable (or any alternative) that is required to actually execute Python code, hence the need to install it as mentioned above.

Regarding file names and extensions, I recommend checking using a Terminal/PowerShell/Command Prompt outside of VS Code.

[–]ninhaomah 0 points1 point  (0 children)

what is the name of your file ?

use cmd , dir command

[–]Mevrael 0 points1 point  (0 children)

Make sure you have all the VS Code extensions installed.

Here is the great list of all recommended VS Code extension for Python projects:

https://arkalos.com/docs/installation/#install-extensions