我正按照https://blog.jetbrains.com/pycharm/2010/12/python-remote-debug-with-pycharm/中的说明尝试在远程linux服务器上使用debug一个python文件 .
即使我按照所有说明操作,在本地计算机上调试或执行远程文件时,它也会引发[Errno2]没有这样的文件或目录
ssh://user@0.0.0.0:22/home/user/anaconda3/envs/pytorch/bin/python3.6 -u /home/user/dir1/group/algorithm/da_rnn_test.py
bash: line 0: cd: /home/user/dir1/group/algorithm: No such file or directory
/home/user/anaconda3/envs/pytorch/bin/python3.6: can't open file '/home/user/dir1/group/algorithm/da_rnn_test.py': [Errno 2] No such file or directory
奇怪的是,我从未将路径映射和部署配置设置为 cd: /home/user/dir1/group/algorithm: No such file or directory
.
以下是Project Deployment和Interpreter Path映射的配置:
-
项目翻译:
/home/user/anaconda3/envs/pytorch/bin/python3.6
-
路径映射:
<Project root>→/home/user/desktop/WorkSpace/dir1/github/dir1
-
部署
-
连接>根路径:
/home/user/desktop/WorkSpace/dir1/github/dir1
-
映射
-
本地路径:
C:\Users\qraft\PycharmProjects\DA_RNN_dev
-
服务器上的部署路径'linux server':
/
-
服务器上的Web路径'linux server':
/