How to Seamlessly Run Python Code on a Remote Server Using PyCharm

This guide walks you through configuring PyCharm to connect to a remote Linux server, set up an SSH Python interpreter, enable automatic file synchronization, and run long‑running web‑scraping scripts directly on the server, streamlining development without manual file transfers.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
How to Seamlessly Run Python Code on a Remote Server Using PyCharm

Preface

This article shows how to configure PyCharm to use a Python environment on a remote server.

Why do it?

The author needed to run a long‑running web‑scraping script on a remote machine without manually transferring files.

My environment

滴滴云 ubuntu 18.04 version, installed Anaconda
pycharm2019 professional edition

Note:

PyCharm must be the Professional edition to support remote interpreter.

Prefer using Anaconda on Linux to avoid conflicts with the system pip.

Steps

Configure remote server information

Open PyCharm → Tools → Deployment → Configuration and add a new SFTP server, give it a name, and fill in the host, port, username and password.

Set up the Connection and Mappings sections, then click OK.

Enable automatic upload via Tools → Deployment → Automatic Upload.

Configure remote Python interpreter

Open

File → Settings → Project: <project name> → Project Interpreter

, click the plus sign, choose SSH Interpreter, enter the server details, and select the path to the remote Python executable.

Apply the settings and confirm.

Synchronize code

Press Ctrl+S (or enable automatic upload) to push local changes to the remote /tmp directory.

Applicable scenarios

Ideal for web‑scraping projects or any long‑running tasks that need to run on a remote Linux server without manual file transfers.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PythonIDEWeb ScrapingRemote DevelopmentPyCharmSSH
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.