[英]WSL VSCode call Windows Python Executable
I want Bash to call my Windows Python Executable when I run my python files .我希望 Bash 在我运行 python 文件时调用我的 Windows Python 可执行文件。 I am only using WSL so I can replace cmd/powershell with bash. I do not want to install anything on WSL, I want to use existing programs on Windows (in this case Python).我只使用 WSL,所以我可以用 bash 替换 cmd/powershell。我不想在 WSL 上安装任何东西,我想使用 Windows 上的现有程序(在本例中为 Python)。
However when I try to run my Python file (Clicking 'play' button) I get the error:但是,当我尝试运行我的 Python 文件(单击“播放”按钮)时,出现错误:
-bash: C:/Users/Connor/AppData/Local/Programs/Python/Python310/python.exe: No such file or directory
I believe this can be solved by replacing C: with \mnt\c我相信这可以通过将 C: 替换为 \mnt\c 来解决
How can I achieve this?我怎样才能做到这一点?
I had a same problem as yours.我和你有同样的问题。 I solved this by following steps.我通过以下步骤解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.