0
votes

I'm using WSL and VS Code, and when I open the terminal, I see the following errors. Then the python interpreter cannot be found.

What's wrong with my vs code configuration?

bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
bash: ml: line 1: syntax error: unexpected end of file
bash: error importing function definition for `ml'

screenshot of VS Code

Remember that on wsl/linux the python interpreter is called using python3 not py or python like on windows. - MikhaD
Since you mentioned WSL, check your .bash_profile or .bashrc. VS Code's terminal is probably loading that, and that file has the syntax errors. - Gino Mempin