zhe*_*ang 0 python visual-studio-code
我想设置默认的 python 解释器路径,以避免每次登录远程服务器时都被询问。
我尝试过这个类似答案中的方法。我的workspace.json 现在看起来像:
{
"folders": [
{
"uri": "vscode-remote://ssh-remote+172.1.1.1/home/user/workspace/folder1"
},
{
"uri": "vscode-remote://ssh-remote+172.1.1.1/home/wzy/workspace/folder2"
}
],
"remoteAuthority": "ssh-remote+172.1.1.1",
"settings": {
"python.defaultInterpreterPath": "/home/user/miniconda3/envs/py38/bin/python",
}
}
Run Code Online (Sandbox Code Playgroud)
但是每次重新连接到服务器时,我都需要手动选择 python 解释器(否则/user/bin/python3将选择基本解释器)
| 归档时间: |
|
| 查看次数: |
5151 次 |
| 最近记录: |