Score:1

I'm having trouble with the shell in Visual Code Studio in WSL

nr flag

I'm a Visual Code Studio user. I have used the CMD default shell in Visual Studio Code but I passed on ubuntu a few days ago. So I also change the Visual Studio Code default shell by replacing it with ubuntu(wsl). The problem is that when I try to run my script it writes :-bash: C:/Program Files/Python310/python.exe: No such file or directory. By the way I'm a Python language user.

Score:1
sa flag

You don't need WSL to access a bash shell in Visual Studio Code. The most normal way to do it is to install the git-bash app and Visual Studio Code in Windows and then you can access all your installed Python files in Windows from Visual Studio Code and use a bash shell in Visual Studio Code in Windows too.

Start git-bash Visual Studio Code extension adds two "bash" commands to VSCode that allow you to start git-bash, either in the folder of the current file or in the workspace's root folder. Open your preferred browser and visit Git Bash downloads page by clicking the following link: Git Download Page. Once the page loads, click the Download for Windows button.

Plugin provides two commands:

  • bash will open bash in your current file's directory.
  • bash in workspace will open bash always in the root workspace directory, despite what file is opened.

Just press F1 and then type any of above commands to start git-bash.exe.

Note that you will need to have git-bash.exe on the environment path.

nr flag
Thanks so much it's working !
karel avatar
sa flag
@Phonki If this answered your question, you can mark this answer as accepted by clicking the gray check mark beside the answer to change its color to green.@Phonki
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.