我最近切换到 WSL (Ubuntu)。现在,当我使用创建虚拟环境时
python -m venv venv
VS Code 不会自动检测到它。
我的设置.json
{
"python.pythonPath": "C:\\Users\\ankus\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe",
}
Run Code Online (Sandbox Code Playgroud)
我尝试将其更改为这样
{
"python.pythonPath": "/mnt/c/Users/ankus/OneDrive/Documents/Main Projects/project_folder/venv/bin/python"
}
Run Code Online (Sandbox Code Playgroud)
但似乎没有任何作用。
python python-venv visual-studio-code windows-subsystem-for-linux