pycharm ssh interpter No such file or directory

后端 未结 5 685
萌比男神i
萌比男神i 2021-01-30 05:32

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 t

5条回答
  •  攒了一身酷
    2021-01-30 06:16

    Sometimes you can have everything set up correctly (interpreter, deployment, Path mapping, etc) but PyCharm keeps trying to use your local path on the remote machine.

    If this happens, try this 4 fixes:

    1. Go to File->Invalid Caches / Restart

    ...if the problem is still not fixed:

    1. Go to Preferences->Python Interpreter->Path Mappings and check the path mappings of the interpreter. They should look more or less like this:

    ...again, if the previous step didn't work:

    1. Go to Run->Edit Configurations... and check if the path mappings are correct:

    1. You can also try to replace the local paths of the script and working directory with the remote ones (as if you were already in that machine).

    1. If you get ModuleNotFoundError but the connection seems to work, go to Run->Edit Configurations...->Environment Variables and add your project's root path to the PYTHONPATH variable.

提交回复
热议问题