I am using a macbook pro 15 as local machine and I have a remote server running ubuntu 14.04
I want to use the remote intepreter to run all the computation but I want to write the code from my local machine.
When I try to run a simple file with pycharm I receive this error:
ssh://donbeo@149.157.140.205:22/usr/bin/python3 -u /Users/donbeo/Documents/phd_code/prova.py
bash: line 0: cd: /Users/donbeo/Documents/phd_code: No such file or directory
/usr/bin/python3: can't open file '/Users/donbeo/Documents/phd_code/prova.py': [Errno 2] No such file or directory
Process finished with exit code 2
I saw few people reporting the same problem but I haven't found a good answer so far. Most of the questions are indeed referring to older versions of pycharm.
It is clear that the file is not in my remote machine because I create it with pycharm in my local one. I was expecting pycharm to do some sort of synchronisation between the local and remote machine.
Be sure your interpreter is chosen as SSH which is to compile, not STFP which is for deployment.
To execute your code on remote machine you'll have to perform few steps
Define a remote interpreter for your project
Python Version (ssh://login@host:port/path/to/interpreter)
. Package list should be populated with records.Define deployment settings
/
is equivalent to/my/root/path
,/dir
to/my/root/path/dir
etc.Deploy your code
Run your code
It can be caused by one of the following:
1. You did not deploy your code on the remote server.!
2. You do not have the permission to read and change files on your deployment path at the remote server.