Pycharm code inspection with remote interpreter

https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html#ssh

Also make sure you refresh the code (set it to automatically upload).

enter image description here

You can also upload your updated files manually, from Tools->Deployment -> Upload to default server.


You need to specify path mappings for particular run configuration or interpreter. After that your local files will point to the remote ones. E.g. /User/local/project= /User/remote/project

Path mappings for the interpreter:

Pycharm > Preferences > Project > Project Interpreter > Click on Project

enter image description here

Path mappings for run configurations:

Run > Edit configuration > Choose run cofig > Choose remote interperter > Fill in mappings

enter image description here

Just to be clear it will still cache some files: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206593675-Path-Mappings-does-not-work-for-me


I found a solution that works for me.

Settings -> Project -> Project Structure

Then right-click on folders and select Sources, so they appear on the menu on the right under Source Folders.

Now the code inspection opens my local file, not those copied in /system/remote_resources/

Tags:

Python

Pycharm