The way I access the projects on my raspberry pi using PyCharm is the following (This expects you to be using PyCharm Pro, supporting SSH connections):
- Mount the home folder on my local machine ( I use SFTP Drive on windows, under Linux use sshfs).
- Open the project from the mounted drive in PyCharm
- Go to Settings -> Project -> Project Interpreter and select the gear next to the Project Interpreter drop down. From there pick “Add Remote”.
- Configure the remote interpreter you want to use.
If the PyCharm project was already created on the server, I guess your run configuration should be in order and running it should work out of the box.
If you created the PyCharm project on your local machine:
- If you have no run configuration yet, go to the file you want to run and do right-click -> Run yourfilename.py or simply hit Shift-F10
- The remote interpreter will complain about non existent files. Go to the dropdown in the top right corner, click it and select ‘Edit Configurations’
- Change the script path and working directory to the actual remote directories. Remember, this is what your interpreter sees, and your interpreter is on your remote machine.
Hope this helps!