2017-07-29 31 views
1

我正在使用PyCharm编写我的树莓派。然后,我把它部署:在PyCharm上执行远程脚本时出现错误的路径

enter image description here enter image description here

而且,我还设置了调试远程口译工作

enter image description here

在我的覆盆子,我可以看到我我设置的目录中的脚本,/home/pi/foo

[email protected]:~/foo $ pwd 
/home/pi/foo 
[email protected]:~/foo $ ls 
main.py TestClass.py 

但是,当我在PyCharm中运行调试时,它尝试在树莓上执行/tmp/pycharm_project_967中的脚本,而不是/home/pi/foo

ssh://[email protected]:22/usr/bin/python3 -u /home/pi/.pycharm_helpers/pydev/pydevd.py --multiproc --qt-support --client '0.0.0.0' --port 42609 --file /tmp/pycharm_project_967/main.py 
bash: line 0: cd: /tmp/pycharm_project_967: No such file or directory 

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

回答

0

我解决了我的问题。当我创建这个项目时,我错误地设置了配置Remote project location

我使用了默认值,而不是/home/pi/foo

enter image description here

相关问题