在PyCharm上执行远程脚本时路径错误

2024-10-03 00:30:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我用PyCharm在我的树莓派编程。然后,我设置部署:

enter image description hereenter image description here

而且,我还设置了与远程解释器一起工作的调试

enter image description here

在我的树莓中,我可以在我设置的目录中看到我的脚本,/home/pi/foo

pi@penelo:~/foo $ pwd
/home/pi/foo
pi@penelo:~/foo $ ls
main.py  TestClass.py

但是,当我在PyCharm中运行debug时,它尝试在raspberry上的/tmp/pycharm_project_967中执行脚本,而不是{}。在

^{pr2}$

为什么?如何将PyCharm设置为在/home/pi/foo/处执行脚本?在


Tags: py目录脚本home远程foo部署编程