2017-07-29 176 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

相關問題