The path for the %run
magic needs to be the path that the server sees, not the client. You are passing the path from the client’s perspective.
When you type run Z:/blah/blah/blah.py
, your terminal sends that path to the IPython server to execute. The server looks for the path Z:/blah/blah/blah.py
, but since it doesn’t exist on the server, the command fails with a file not found error.
The easiest solution is to just run the command with the path the server expects:
%run /path/to/blah/on/server/blah.py
Bottom line: remember that the server cannot access files that the client terminal is running on.