pycharm使用ssh连接服务器(ubuntu)跑代码报错:“sudo+ssh: ……bash: line 0: cd: xxx/code: No such file or directory”

pycharm使用ssh连接服务器(ubuntu)跑代码报错:“sudo+ssh: ……bash: line 0: cd: xxx/code: No such file or directory”

sudo+ssh://xxx@xxx/anaconda3/envs/py36/bin/python -u “xxx/code/main.py”
bash: line 0: cd: xxx/code: No such file or directory
SudoPasswordPrompt655neudrfcn7scuc

目测应该是pycharm的bug,解决方法如下:
File -> Settings-> Project: (你的项目名称) -> Python Interpreter

点击如下图所示的设置按钮:
pycharm使用ssh连接服务器(ubuntu)跑代码报错:“sudo+ssh: ……bash: line 0: cd: xxx/code: No such file or directory”_第1张图片
点Show All…,会出现下图:
pycharm使用ssh连接服务器(ubuntu)跑代码报错:“sudo+ssh: ……bash: line 0: cd: xxx/code: No such file or directory”_第2张图片
在这里面删除一些与当前项目不相关的解释器就可以了

你可能感兴趣的:(pycharm,ssh,ubuntu)