远程连接
![](https://img-blog.csdnimg.cn/direct/e2b8138f797e46ea9c04e5cd6350422f.png)
![](https://img-blog.csdnimg.cn/direct/5048bf9fb37c45d08d353621dac7d252.png)
![](https://img-blog.csdnimg.cn/direct/ae9cde362aea48d293f03f9dd2444861.png)
![](https://img-blog.csdnimg.cn/direct/00905e9e68f04dc0a04ab75794fec029.png)
![](https://img-blog.csdnimg.cn/direct/e97a4adbb44f4ee39b70e838253e99d4.png)
![](https://img-blog.csdnimg.cn/direct/4f6ab0a40a3b493db874b3a5c94d111b.png)
![](https://img-blog.csdnimg.cn/direct/08676bd9c86d4f7c8087590239e0955a.png)
![](https://img-blog.csdnimg.cn/direct/e61f66f86b16492698ad6ef833c053d9.png)
![](https://img-blog.csdnimg.cn/direct/42bbdde6aa1942df840cba6243f50227.png)
![](https://img-blog.csdnimg.cn/direct/bd95302a43cc4c9b8918602755a2b856.png)
![](https://img-blog.csdnimg.cn/direct/f4fabca92e3f4e5d878109291d8a6fa6.png)
![](https://img-blog.csdnimg.cn/direct/7535f4927a8c4f9ba1ccc5a59c826e83.png)
![](https://img-blog.csdnimg.cn/direct/4824437df3cd4eca8c247bbf195354e0.png)
![](https://img-blog.csdnimg.cn/direct/15077fcfe7c145d08da6e7cd0f077f3e.png)
![](https://img-blog.csdnimg.cn/direct/ef7af3f3d84c4e1fb98dadc5ea8ab39c.png)
到这里vscode远程到ubuntu和关闭远程连接,已完成
配置python环境
在远程目录下新建.vscode隐藏文件夹,文件夹里新建一个 settings.json 文件,
先远程服务器看下conda下的python虚拟环境位置
![](https://img-blog.csdnimg.cn/direct/a0e85cd41fba41978c822eb3229da304.png)
![](https://img-blog.csdnimg.cn/direct/7584f94f1fa0497ca0a8ebd8792f4983.png)
![](https://img-blog.csdnimg.cn/direct/0bea7273803949c1a1d0e3ffeb831c47.png)
settings.json位置及内容如下
![](https://img-blog.csdnimg.cn/direct/627f40b466874b4cba345c9ee8e0b764.png)
测试python环境
![](https://img-blog.csdnimg.cn/direct/9e8a34bed32d48a783d357d3bd20c588.png)
![](https://img-blog.csdnimg.cn/direct/f9f67d10fdfd4402b055e7c9b22c1859.png)
打印python解释器路径
![](https://img-blog.csdnimg.cn/direct/2d3d6b1cf43f4cadbf4780a73f034ed3.png)
![](https://img-blog.csdnimg.cn/direct/385673353c0f4257b756c114550f7b9f.png)
远程连接
到这里vscode远程到ubuntu和关闭远程连接,已完成
在远程目录下新建.vscode隐藏文件夹,文件夹里新建一个 settings.json 文件,
先远程服务器看下conda下的python虚拟环境位置
settings.json位置及内容如下