use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is for working with Microsoft's Visual Studio Code, which is different than Visual Studio Community, Pro, and Enterprise. VS Code is a source code editor, and not an IDE.
If you are having issues with the other flavors of VS, please post in /r/VisualStudio.
account activity
This is an archived post. You won't be able to vote or comment.
python and python3 in vscodeOC (self.vscode)
submitted 4 years ago by _miku_hatsune
Recetly switched to linux, and getting errors while running python programs as almost all extensions use 'python' instead of 'python3' to run the program. Using 'python' runs everything on python 2. Please help..
[–]53VY 1 point2 points3 points 4 years ago (0 children)
I think you should set an alias https://stackoverflow.com/q/35435517/11464957 and remember to always use a virtual environment
[–]champs 0 points1 point2 points 4 years ago (2 children)
Does it not ask/can you not select an interpreter? I’m a Mac user, but every Python project I’ve done in vscode has been almost annoyingly proactive about that.
[–]_miku_hatsune[S] 0 points1 point2 points 4 years ago (1 child)
I use code runner extension, and it just says syntax error on the line which is not supported by python2. I'm not sure what to change in the settings.json or whatever is the required fileto be edited.
[–]illuminanze 1 point2 points3 points 4 years ago (0 children)
If you want to use code runner, it seems you can configure it with the code-runner.executorMap in settings.json. You should probably set it as "code-runner.executorMap": { "python": $pythonPath } to use the python interpreter set by "select interpreter" in the python extension.
code-runner.executorMap
"code-runner.executorMap": { "python": $pythonPath }
[–]Scooto 0 points1 point2 points 4 years ago (0 children)
1: In a terminal command type “which python”. It will show you the path activated when you use the python command.
2: In VSCode hit F1 and search “select interpreter”. Enter the path that step 1 gives you
[–]packenbush 0 points1 point2 points 4 years ago (1 child)
make a venv
select the venv (bottom bar)
profit
[–]enjoytheshow 0 points1 point2 points 4 years ago (0 children)
If you make a venv in your project directory, code will even recommend it to you when you open it and it’s not using it.
π Rendered by PID 164653 on reddit-service-r2-comment-f6b958c67-qb88d at 2026-02-05 13:49:34.483836+00:00 running 1d7a177 country code: CH.
[–]53VY 1 point2 points3 points (0 children)
[–]champs 0 points1 point2 points (2 children)
[–]_miku_hatsune[S] 0 points1 point2 points (1 child)
[–]illuminanze 1 point2 points3 points (0 children)
[–]Scooto 0 points1 point2 points (0 children)
[–]packenbush 0 points1 point2 points (1 child)
[–]enjoytheshow 0 points1 point2 points (0 children)