I'm working on a project that is located in a remote server. Can I open it in PyCharm from my local machine ? I couldn't find the way.
5 Answers
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!

- 21,470
- 7
- 54
- 51

- 558
- 5
- 11
-
When run a project on this setup, will my server resources (CPU, GPU, memory, etc.) be used? – Celso França Jun 17 '20 at 20:23
-
The last line gives it away: "...and your interpreter is on your remote machine.", so yes, this will run the interpreter on your server, using your server's resources. In fact, I originally used this to work remotely on my machine-learning-rig. – Skusku Jun 18 '20 at 08:18
-
I found that `Sync with Deployed to...` also works fine (without need for a local mount), when the directory mappings are correctly set for the configured `Remote Host`. – phi May 31 '21 at 09:36
- The following will configure PyCharm Professional 2021.3.1 on Windows 10 to run a project on a remote Linux server. It's likely the configuration will be similar for PyCharm on macOS.
- Open PyCharm
- Create a New Project and select Pure Python
- Fill the Location and Remote project location, which may be new or existing.
- Select the ellipsis next to Interpreter under Previously configured interpreter
- Select SSH Interpreter and create New server connection
- Create the project
- Press Ctrl + Alt + S to open Settings
- Select Deployment under Build, Execution, Deployment
- Select Python Interpreter under Project:...
- Close Settings with OK, or Apply
- Use PUTTY or some other app to verify the project now exists on the remote system
- Right click the project and select Deployment for deployment options
Note
- This will likely require being connected to the corporate network through a VPN.

- 56,955
- 33
- 144
- 158
-
At the risk of being redundant, deployment is not available in the community version of pycharm. – Brad Grissom May 09 '23 at 18:33
To update on excellent @Skusku answer given here: https://stackoverflow.com/a/47614111/2119941
After mounting remote folder with SFTP Drive if Pycharm project browser doesn't recognize remote drive just copy-paste it in location bar on top and allow Pycharm to load it:
And when you load your project files to Pycharm you need to add remote interpreter which is present on your server:
In following screens just add host, credentials and than path to python in virtual env or whatever python is running your server project files.

- 13,566
- 7
- 90
- 104
Search remote sync under plugins in pycharm. Many work. I think most common one is source sync.

- 4,541
- 2
- 34
- 55
-
Another alternative (tool outside of pycharm) is the Unison sync tool. It runs as a stand-alone file sync program between two machines. – Brad Grissom May 09 '23 at 18:35
Pycharm needs access to the project's directory.
You can open a remote project if the storage partition for that project directory is shared and mounted/mapped on your local machine with the right permissions by running pycharm on your machine and opening that locally visible project directory.
Note: you should not be opening the project in multiple such pycharm sessions simultaneously as they will collide/conflict with each-other.
Alternatively if you use a version control system (VCS) that supports remote repository access you can create a local copy of the project, work in that copy and push your changes to the remote project as needed (depending on your VCS specifics).

- 39,470
- 12
- 57
- 97