🐙 GitHub: From Zero to Hero
🐍 PyCharm: From Install to Remote Dev
🎓 JetBrains Professional — Free with .edu

PyCharm
From Install to Remote Dev

Master the world's most powerful Python IDE — from your first venv to running code on a remote server over SSH.

8
Modules
Free
with .edu
SSH
Remote Dev
Live
Debugger
🐛

Visual Debugger

Set breakpoints, step through code line-by-line, inspect any variable — all without touching the terminal.

🖥️

True Remote Development

Write code locally, run it on a remote server over SSH. Your files sync automatically. Feels like the server is your laptop.

🎓

Free for Students

JetBrains gives every student with a .edu email a free Professional license — worth $249/year. No credit card needed.

📦
Module 0

Install & First Project

  • Free Pro license with .edu email
  • New project with Anaconda Python
  • Run a script & Jupyter Notebook
🗺️
Module 1

Interface Tour

  • Project panel, editor, tool windows
  • Status bar & Python interpreter indicator
  • Search Everywhere & quick actions
🐍
Module 2

Interpreters & venv

  • System Python vs virtualenv vs conda
  • Create & switch interpreters in PyCharm
  • Install packages via GUI
🐛
Module 3

Debugging

  • Breakpoints, step over, step into
  • Variables panel & watches
  • Interactive debugger animation
💻
Module 4

Terminal

  • Built-in terminal with venv auto-activation
  • Multiple tabs & split terminals
  • Python Console & Jupyter
Module 5

Git & GitHub

  • Create GitHub repo, clone into PyCharm
  • Commit, push & verify on github.com
  • Clone textbook & reference repos
🔐
Module 6

SSH & AWS Remote Interpreter

  • SSH config: IPv4 IP, ubuntu, .pem key
  • Add AWS as a Python interpreter
  • Run code on AWS, switch interpreters
🚀
Module 7

AWS Deployment & File Sync

  • SFTP deployment to AWS EC2
  • Local ↔ remote path mapping
  • Upload, sync, remote file browser
⌨️
Reference

Shortcut Cheat Sheet

  • Every essential shortcut by category
  • Mac & Windows/Linux side-by-side
  • Copy any shortcut with one click
📦
Beginner⏱ 20 min

Module 0 · Install PyCharm & Get Your Free Pro License

Community vs Professional

FeatureCommunity (Free)Professional (Free with .edu)
Python editing & completion
Debugger
Git integration
SSH Remote Interpreter🚫
Deployment & file sync🚫
Jupyter Notebook support🚫
Database tools🚫
Django / Flask support🚫
Docker integration🚫
Students get Professional for free. If you have a .edu email address, you qualify for JetBrains' free educational license — this gives you PyCharm Professional plus every other JetBrains IDE.

Step 1 — Get the Free Student License

1
Go to the JetBrains Student Program page

Navigate to jetbrains.com/student and click "Apply now".

2
Fill in the form with your .edu email
ℹ️
Use your university email (e.g., yourname@university.edu). JetBrains verifies it automatically — no documents needed.
⚠️
Use "University / College" as the enrollment type, not "secondary school." Select your actual university from the dropdown or type it in.
3
Check your .edu inbox for a verification email

Click the confirmation link. JetBrains will create a JetBrains Account linked to your .edu address.

4
Download PyCharm Professional from jetbrains.com/pycharm

Choose the Professional edition. There is also a JetBrains Toolbox App (recommended) that manages all JetBrains IDEs and updates them automatically.

5
Activate with your JetBrains Account

On first launch, choose "Log in to JetBrains Account" and enter the account you created with your .edu email. The license activates instantly.

💡
Your license lasts 1 year and renews for free each year as long as you're enrolled. You'll get a renewal email 30 days before it expires.

First-Launch Setup

1
Create a New Project

On the welcome screen, click "New Project". Choose a folder, select "Python" as project type, and pick "New environment using Virtualenv" — PyCharm will create a virtual environment automatically.

2
Choose a Base Interpreter

PyCharm will look for Python installations on your system. If you don't see Python 3.10+, install it from python.org first, then re-open PyCharm.

New Project
🐍 Python
⚡ FastAPI
🌐 Django
🔬 Scientific
Python Project
Name:my_project
Location:~/projects/my_project
Interpreter: New Virtualenv environment
Base Python: Python 3.11 (/usr/bin/python3)
📁 Virtualenv will be created at: ~/projects/my_project/.venv
CancelCreate
3
Create your first file

Right-click the project root in the Project panel → New → Python File. Name it main.py. Type print("Hello, PyCharm!") and press ⌃R (Mac) or Shift+F10 (Windows) to run it.

Quick Start: Local Project with Anaconda

For data science and deep learning, Anaconda is the recommended Python distribution. Follow these steps to connect your existing Anaconda installation to a new PyCharm project instead of creating a new virtualenv.

ℹ️
First, find your Anaconda Python path.
Mac: Open a Terminal (Utilities → Applications), run which python, and copy the result (e.g., /opt/anaconda3/bin/python).
Windows: The default Anaconda path is C:\ProgramData\anaconda3\python.exe
1
File → New Project — set a folder in the Location field

Choose the directory where your project files will live.

2
Set Interpreter TypeCustom Environment

Then set Environment to Select existing and Type to Python.

3
Click Browse next to Python path — paste the Anaconda path — click OK → Create

PyCharm creates the project using your Anaconda Python, giving you immediate access to NumPy, Pandas, TensorFlow, and all other Anaconda packages.

New Project
🐍 Pure Python
🌐 Django
⚡ FastAPI
🔬 Flask
New Project
Location:~/Documents/PythonProject1
Interpreter type:Custom environment
Environment:Select existing
Type:Python
Python path:/opt/anaconda3/bin/pythonBrowse
CancelCreate

Test with a Python Script

4
Right-click the project name → New → Python File → name it python_eval → press Return

Enter the two lines below in the editor, then right-click anywhere in the editor and select Run 'python_eval'.

python_eval.py
import numpy as np
print('hello world')
5
Verify the output in the Run panel at the bottom
Run — python_eval
/opt/anaconda3/bin/python python_eval.py
hello world
Process finished with exit code 0

Test with a Jupyter Notebook

6
Right-click the project name → New → Jupyter Notebook → name it python_eval

PyCharm opens the notebook in its built-in Jupyter editor. A new .ipynb file appears in your project.

7
Enter print('hello world') in the cell → press Shift+Return to run it

The cell executes and hello world appears immediately below it with a green checkmark and a timing badge.

PyCharm is now connected to your local Anaconda installation. You will later connect it to GitHub (Module 5) and an AWS cloud instance (Modules 6 & 7) so you can run code on any of those systems.
🎯 TaskModule 0 — Install & First Project
  • Apply for JetBrains Student License with your .edu email
  • Download and install PyCharm Professional, activate with your JetBrains Account
  • Find your Anaconda Python path (Mac: which python in Terminal)
  • Create a new project using Custom Environment → Select existing → paste Anaconda Python path
  • Create python_eval.py, enter import numpy as np and print('hello world'), and run it
  • Create a Jupyter Notebook, run print('hello world') with Shift+Return, verify output
🗺️
Beginner⏱ 20 min

Module 1 · Interface Tour

The PyCharm Layout

PyCharm — my_project
📁 Project
📄 main.py
📄 utils.py
📁 tests/
📄 test_main.py
📄 requirements.txt
📁 .venv/
main.py
1 def greet(name):
2 return f"Hello, {name}!"
3
4 result = greet("World")
5 print(result)
🔍 Structure
⚡ greet(name)
Variables
result = "Hello, World!"
▶ Run
🐛 Debug
💻 Terminal
🐍 Python Console
⎇ Git
🚀 Deployment

Key Areas

AreaWhat it's forHow to open
Project PanelFile tree of your project⌘1 / Alt+1
EditorWhere you write code — center stageClick any file
Run PanelOutput from running your script⌘4 / Alt+4
Debug PanelBreakpoints, variables, call stack⌘5 / Alt+5
TerminalShell inside the IDE⌥F12 / Alt+F12
Python ConsoleInteractive REPLTools → Python Console
Git PanelCommit, log, branches⌘9 / Alt+9
DeploymentRemote server file syncTools → Deployment

The Most Important Shortcuts

ActionMacWindows/Linux
Search Everywhere⇧⇧ (double Shift)Shift Shift
Run file⌃RShift+F10
Debug file⌃DShift+F9
Find & Replace⌘RCtrl+R
Go to definition⌘B or ⌘ClickCtrl+B or Ctrl+Click
Reformat code⌘⌥LCtrl+Alt+L
Comment/uncomment⌘/Ctrl+/
Settings⌘,Ctrl+Alt+S
💡
Search Everywhere (double Shift) is the most powerful shortcut in PyCharm. It finds files, classes, functions, settings, actions — anything. Master this one first.
🎯 TaskModule 1 — Explore the Interface
  • Open the Project panel (⌘1) and find your main.py
  • Use double-Shift to search for "Python Console" and open it
  • Run your script with ⌃R and see output in the Run panel
  • Change the theme: Settings → Appearance → Theme
🐍
Beginner⏱ 25 min

Module 2 · Interpreters & Virtual Environments

Why does this matter?
Every Python project should have its own virtual environment — an isolated copy of Python with only the packages that project needs. Without this, installing a library for one project can break another. PyCharm manages this for you automatically.

Types of Interpreters

📦
Virtualenv
.venv/bin/python
Recommended
🐍
System Python
/usr/bin/python3
Avoid for projects
🐼
Conda Environment
~/miniconda3/envs/myenv/bin/python
For data science
🐋
Docker
container:python3
Pro only
🔐
SSH Remote
user@server.edu:/usr/bin/python3
Pro only · Module 6

Create a New Virtualenv

1
Open Settings → Project → Python Interpreter

Mac: ⌘, → Project → Python Interpreter. Windows: Ctrl+Alt+S → Project → Python Interpreter.

Settings
Project
🐍 Python Interpreter
📁 Project Structure
Build
⚙️ Compiler
🚀 Deployment
Python Interpreter
Interpreter:
🐍 .venv/bin/python (Python 3.11.4) ⚙ Add
PackageVersionLatest
numpy1.26.4
pandas2.2.0
pip24.0
+ Install - Remove ↑ Upgrade
CancelOK
2
Click "Add Interpreter" → "Add Local Interpreter"

Select Virtualenv EnvironmentNew. PyCharm suggests a path like project-folder/.venv. Choose the base Python version (e.g., Python 3.11).

Add Python Interpreter
📦 Virtualenv Environment
🖥️ System Interpreter
🐼 Conda Environment
🐋 Docker
🔐 On SSH…
Virtualenv Environment
New / Existing:New environment
Location:~/projects/my_project/.venv
Base Python:Python 3.11 /usr/bin/python3
✓ Inherit global site-packages   ✓ Make available to all projects
CancelOK
3
Click OK — PyCharm creates the venv automatically

You'll see the interpreter change in the status bar (bottom right). Future package installs go into this venv only.

Switch Between Interpreters

Click the interpreter name in the bottom-right status bar — a popup lets you switch instantly between any interpreter configured for that project.

ℹ️
You can also switch via the run configuration. Click the run dropdown (top right) → Edit Configurations → change the Python Interpreter for that specific run.

Install Packages via PyCharm

1
Settings → Project → Python Interpreter

You see a list of installed packages. Click the + button.

2
Search for the package (e.g., "numpy") and click Install

PyCharm runs pip install numpy in your venv. You can see the output in the panel below.

💡
PyCharm also detects requirements.txt automatically. If it sees missing packages, a yellow banner appears in the editor with a one-click "Install requirements" button.

Conda Environments

Terminal (create conda env first, then add to PyCharm)
# Create a conda environment with a specific Python version
conda create -n ml-project python=3.11 numpy pandas scikit-learn
conda activate ml-project

# Then in PyCharm: Add Interpreter → Conda Environment → Existing
# PyCharm finds conda automatically if it's in your PATH
🎯 TaskModule 2 — Configure Interpreters
  • Open Settings → Python Interpreter and see the current venv
  • Install the requests package via the PyCharm GUI
  • Click the interpreter in the status bar and confirm it shows your venv
🐛
Intermediate⏱ 35 min

Module 3 · Debugging

What is a debugger?
A debugger lets you pause your program mid-run and inspect the state of every variable at that exact moment. Instead of adding print() statements everywhere, you set a breakpoint — the program stops there and waits for your instructions.

Interactive Debugger — Step Through Code

Press Run Debug to start. Use the buttons to step through the code and watch the variables update in real time.

grade_calculator.py — Debug
1
def calculate_grade(scores):
2
total = sum(scores)
3
average = total / len(scores)
4
if average >= 90:
5
grade = 'A'
6
elif average >= 80:
7
grade = 'B'
8
return grade
9
 
10
scores = [85, 92, 78, 95, 88]
11
result = calculate_grade(scores)
12
print(result)
Variables
Press ▶ Run Debug to start
Not running

Debug Controls

ControlMacWin/LinuxWhat it does
▶ Resume / Run Debug⌃DShift+F9Start debug / run to next breakpoint
⤵ Step OverF8F8Execute current line, stay in this function
⤴ Step IntoF7F7Step into the function call on current line
⤶ Step Out⇧F8Shift+F8Finish current function, return to caller
⏩ Run to Cursor⌥F9Alt+F9Run until the line where cursor is
⏹ Stop⌘F2Ctrl+F2Kill the debug session

Breakpoints

Click the gutter (the narrow strip left of the line numbers) to set a red breakpoint dot. Click again to remove it. The program will pause just before executing that line.

💡
Conditional Breakpoints: Right-click a breakpoint → Edit Breakpoint → add a condition like average < 80. The program only stops when that condition is true — saves time when debugging loops with thousands of iterations.

The Variables Panel

When paused at a breakpoint, the Variables panel shows every variable in scope. You can:

Watches & Evaluate Expression

Add a Watch

In the Variables panel, click "+" → New Watch". Type any expression like total * 2 or len(scores). It updates automatically at every step.

Evaluate Expression

Press ⌥F8 (Mac) or Alt+F8 (Win) while paused. Type any Python expression — it runs in the current scope. Great for testing a fix without restarting the whole program.

🎯 TaskModule 3 — Debug a Script
  • Use the interactive debugger above — step through all lines
  • Set a breakpoint in your own main.py and run in debug mode (⌃D)
  • While paused, add a Watch expression and see it update
  • Try Evaluate Expression (⌥F8) to run a quick calculation while paused
💻
Intermediate⏱ 20 min

Module 4 · Terminal in PyCharm

The Built-in Terminal

PyCharm has a full terminal emulator built in. The key advantage: it automatically activates your project's virtual environment when it opens. No need to manually run source .venv/bin/activate every time.

Terminal — PyCharm
(.venv) user@mac ~/my_project $ pip list
Package Version
------------ -------
numpy 1.26.4
pandas 2.2.0
pip 24.0
(.venv) user@mac ~/my_project $ python main.py
Hello, World!

Notice the (.venv) prefix — the virtual environment is active. Any pip install here goes into your project's isolated environment.

Open the Terminal

ActionMacWindows/Linux
Open Terminal⌥F12Alt+F12
New terminal tab⌘T in terminalCtrl+Shift+T
Close tab⌘WCtrl+W
Split terminalRight-click tab → SplitRight-click → Split

Multiple Terminal Tabs

You can open multiple terminal tabs — useful for running a server in one tab and sending requests in another:

Tab 1 — Run Flask server
python app.py
# server running on http://127.0.0.1:5000
Tab 2 — Test the API

Python Console vs Terminal

TerminalPython Console
What it isFull shell (bash/zsh/PowerShell)Interactive Python REPL
Best forRunning scripts, git, pip, system commandsExploring objects, testing snippets
Opens with venv✅ Automatic✅ Uses project interpreter
Can import your modulesOnly if you run python first✅ Yes, directly
Open via⌥F12Tools → Python Console
💡
In the Python Console, use ⌃Space (Ctrl+Space) for auto-completion — it works just like the editor. You can inspect objects, run quick tests, and even plot matplotlib graphs interactively.

Changing the Default Shell

Settings → Tools → Terminal → Shell path. Set it to /bin/zsh, /bin/bash, or C:\Program Files\Git\bin\bash.exe on Windows.

🎯 TaskModule 4 — Master the Terminal
  • Open the terminal (⌥F12) and verify (.venv) is shown
  • Install a package with pip install requests in the terminal
  • Open a second terminal tab and split it
  • Open the Python Console and import your installed package
Intermediate⏱ 30 min

Module 5 · Git in PyCharm

Why use Git inside PyCharm?
PyCharm's Git integration lets you commit, push, pull, resolve conflicts, and review history — all without leaving the editor. The visual diff tool makes merge conflicts much easier to understand than raw terminal output.

Enable VCS / Connect a Repo

1
Initialize a new repo: Git menu → Initialize Repository

Or open an existing repo: File → Open → select the folder. PyCharm detects .git/ automatically.

2
Add a remote: Git → Manage Remotes

Click + and paste your GitHub URL. Name it origin.

https://github.com/your-username/your-repo.git

The Commit Workflow

1
Open the Commit panel: ⌘K (Mac) / Ctrl+K (Win)

A panel shows all changed files. Check the ones you want to stage, write a commit message, and press "Commit" or "Commit and Push".

Commit
Changes
File
main.py
utils.py
README.md
Add data processing utilities and update main entry point
Cancel Commit Commit and Push…
COMMIT OPTIONS
☑ Reformat code
☑ Run tests
☐ Sign-off commit
AUTHOR
Your Name
2
Review the diff before committing

Click any changed file in the panel to see a side-by-side diff right there. Red = removed, green = added. You can even edit directly in the diff view.

3
Push: Git → Push (⌘⇧K / Ctrl+Shift+K)

A dialog shows the commits about to be pushed and the target branch. Confirm and click Push.

Push Commits to origin/main
1 commit to push to origin/main
MessageHash
Add data processing utilities…a3f9c12
CancelPush

Key Git Actions

ActionMacWindows
Commit⌘KCtrl+K
Push⌘⇧KCtrl+Shift+K
Pull⌘TCtrl+T
View Git Log⌘9 → Log tabAlt+9 → Log
New BranchGit menu → New BranchGit → New Branch
Annotate (blame)Right-click gutter → AnnotateRight-click → Annotate
Revert file⌘⌥ZCtrl+Alt+Z

Resolving Merge Conflicts Visually

When a merge conflict occurs, PyCharm opens a 3-panel merge tool:

PyCharm 3-Way Merge Tool
⬅ Yours (Local)
def greet(name):
return "Hello " + name
⬆ Result
def greet(name):
return f"Hello, {name}!"
Theirs (Remote) ➡
def greet(name):
return f"Hello, {name}!"

Click the or arrows to accept a change from either side into the Result panel. When done, click "Apply". PyCharm marks the conflict as resolved automatically.

Git Log Viewer

Open the Git panel (⌘9 / Alt+9) → click the Log tab. You see the full commit graph, click any commit to inspect changes, filter by author, branch, or date, and right-click to cherry-pick or revert.

Connecting PyCharm to GitHub: Clone-First Workflow

Create on GitHub, then clone into PyCharm
Start every course project by creating the repository on GitHub first, then cloning it in PyCharm. This keeps your local work and remote GitHub copy permanently linked from day one.
1
Log into github.com — click the + icon (top right) → New repository

Enter a name (e.g., PycharmGitHub), choose Private, and click Create repository. You can make it public later — private repos are visible only to people you share them with.

2
In PyCharm, click Clone Repository → select GitHub → Log In via GitHub…

Enter your GitHub username and password if prompted. All your repositories will appear in the list.

3
Select PycharmGitHub from the list — verify the local directory — click Clone

PyCharm clones the (empty) repository and opens it as a new project. There will be no files yet.

4
Right-click the project name → New → Python File → name it EvalGithub

Enter the line below. Notice the filename appears in green — this means it is a new file not yet tracked by Git.

EvalGithub.py
print('Hello World')
5
Click the Commit icon (blue, left panel) → check the new file → enter a message → Commit and Push…

Type a description like Add file EvalGithub.py in the message box at the bottom of the Commit panel. Click Commit and Push….

Commit
File
EvalGithub.py
Add file EvalGithub.py
Commit Commit and Push…
6
Go back to github.com — refresh your repository — the file is now there
💡
As you write code for exercises and projects, create a GitHub repo for each one. When you make changes, commit and push so GitHub tracks all your changes. Click the git icon at the bottom-left of the PyCharm window to see the full change history — you can revert to an earlier version if you find errors.

Cloning Reference Repositories

To clone any public GitHub repository, click Clone Repository → Repository URL and paste the URL. Two repositories worth cloning for this course:

RepositoryContents
github.com/NNDesignDeepLearning/
NNDesignDeepLearning
All textbook chapters and lab files. Clone this to run labs in PyCharm locally or on your AWS instance.
github.com/amir-jafari/Deep-LearningTensorFlow and PyTorch example programs for the two deep learning frameworks used in this course.
🎯 TaskModule 5 — GitHub Integration
  • Create a Private repository on github.com named PycharmGitHub
  • Clone it into PyCharm via Clone Repository → GitHub → Log In via GitHub
  • Create EvalGithub.py, enter print('Hello World') — verify filename is green
  • Commit and Push — verify the file appears on github.com
  • Clone the NNDesignDeepLearning textbook repository by URL
  • Clone the amir-jafari/Deep-Learning repository by URL
🔐
Advanced⏱ 40 minPro only

Module 6 · SSH & AWS Remote Interpreter

What is a Remote Interpreter?
A Remote Interpreter lets you write code on your local machine but run it on a remote server via SSH. PyCharm handles the file sync automatically. This is essential for HPC clusters, GPU servers, or cloud VMs where you need more compute power than your laptop.

How It Works

💻
Your Laptop
PyCharm Editor
local files
SSH tunnel
file sync (SFTP)
🖥️
Remote Server
Python runs here
GPU / HPC cluster
stdout / stderr
back to PyCharm
📊
Output
Appears in
PyCharm Run panel

Step 1 — Add SSH Credentials

1
Settings → Tools → SSH Configurations

Click + to add a new SSH connection. Fill in:

FieldGenericAWS EC2 (Ubuntu AMI)
Hosthpc.university.eduYour instance's IPv4 Public IP
Port2222
Usernameyour_netidubuntu
Auth typeKey pair or PasswordKey pair
Private key~/.ssh/id_ed25519Path to your .pem file
💡
For AWS: Find your IPv4 Public IP in the EC2 console. The username is ubuntu for Ubuntu-based AMIs. Select Key pair as the authentication type and browse to the .pem file you downloaded when launching the instance. Click Test Connection to verify the connection before saving.
2
Click "Test Connection"

PyCharm will try to SSH into the server. You should see a green "Successfully connected" message. If not, check the host, port, and key path.

Settings — SSH Configurations
Tools
⚙️ Actions on Save
🔐 SSH Configurations
🚀 Deployment
📡 Remote SSH
SSH Configurations
username@hpc.university.edu:22 ● Connected
Host:hpc.university.edu
Port:22
Username:your_username
Auth type:Key pair (OpenSSH)
Private key:~/.ssh/id_ed25519
Test Connection Cancel OK

Step 2 — Configure the Remote Interpreter

3
Settings → Project → Python Interpreter → Add Interpreter → On SSH

Select the SSH configuration you just created. PyCharm will connect and browse the remote Python installations.

4
Choose the remote Python binary

Navigate to the Python path on the remote server, e.g. /usr/bin/python3 or the path to a conda env:

Common remote Python paths
5
Set the sync folder (remote project path)

PyCharm asks where to copy your files on the remote server, e.g. /home/username/projects/my_project. This is where your code will live on the remote.

Add Python Interpreter — SSH
📦 Virtualenv
🖥️ System
🐼 Conda
🔐 On SSH…
🐋 Docker
SSH Interpreter
SSH config:username@hpc.university.edu:22
Python path:/home/username/miniconda3/envs/myenv/bin/python
🐍 Python 3.11.4 · NumPy 1.26 · PyTorch 2.1 detected on remote
Sync folder:/home/username/projects/my_project
CancelOK

Running Code Remotely

After setup, just press Run (⌃R) as normal. PyCharm will:

  1. Sync your local files to the remote server
  2. Execute the script using the remote Python interpreter
  3. Stream stdout and stderr back to your local Run panel
ℹ️
You can even debug remotely — set breakpoints locally and use ⌃D. PyCharm attaches a remote debug server over SSH. Variables, call stacks, watches — all work exactly the same as local debugging.

Install Remote Packages

Option A — via PyCharm GUI (Settings → Interpreter → +)
# PyCharm runs pip install on the REMOTE server for you
Option B — SSH terminal directly
ssh ubuntu@<your-ipv4-public-ip>
pip install torch torchvision

Connecting to AWS: Complete Remote Interpreter Setup

After SSH is configured, set up the remote Python interpreter
With your AWS SSH connection saved (from Step 1 above), you can now point PyCharm's Python interpreter at the Python running on your AWS instance. All code runs there; output streams back to your local Run panel.
1
Settings → Project → Python Interpreter → Add Interpreter → On SSH

In the New Target: SSH dialog, select Existing for SSH Connection and choose your AWS configuration from the dropdown. Click Next, then Next again.

2
Select System Interpreter on the final wizard page

Click Browse on the Sync folders field and select your local project directory. Click Browse on the Remote path field and navigate to the directory on the AWS instance where your project lives (e.g., /home/ubuntu/PythonProject1). Click OK and OK.

3
Click Create — on the next page click inside the Python Interpreter field → Show All…

The remote interpreter appears in the list (e.g., Remote Python 3.12.3 (sftp://ubuntu@…)). Click on it to select it.

4
Click the pencil icon above the server names — rename the interpreter to AWS — click OK

Giving it a clear name makes it easy to identify when switching between local and remote.

5
Click OK, OK, OK — PyCharm downloads stubs and skeletons from the AWS instance

Wait for the update to finish (visible in the status bar at the bottom). Once complete, you can run python_eval.py — it now executes on your AWS instance, not your local computer.

6
Switch between Local and AWS at any time from the bottom-right corner

Click the interpreter name in the status bar (bottom right of the PyCharm window). A popup lists all configured interpreters — select AWS to run remotely, or your local Anaconda interpreter to run locally.

🎯 TaskModule 6 — AWS Remote Interpreter
  • Add SSH credentials: Host = IPv4 Public IP, Username = ubuntu, Auth = Key pair (.pem file)
  • Click Test Connection — verify it shows "Successfully connected"
  • Settings → Project → Python Interpreter → Add Interpreter → On SSH → select Existing → AWS
  • Select System Interpreter, set Sync folders (local) and Remote path (on AWS), click Create
  • Rename the remote interpreter to AWS via the pencil icon — click OK, OK, OK
  • Run python_eval.py and confirm it runs on the AWS instance
  • Switch between Local and AWS using the interpreter selector in the bottom-right corner
🚀
Advanced⏱ 40 minPro only

Module 7 · AWS Deployment & File Sync

Deployment vs Remote Interpreter
Remote Interpreter (Module 6) = PyCharm runs the code remotely via SSH, syncing files automatically on each run.

Deployment (this module) = a dedicated SFTP server configuration that gives you manual and automatic control over file sync — including upload on save, selective sync, and a visual remote file browser.

How Local ↔ Remote Mapping Works

💻 Local (Your Laptop)

📄 main.py
📄 utils.py
📄 config.local.py
📁 data/
📄 train.csv
→ Upload
← Download

🖥️ Remote Server

📄 main.py
📄 utils.py
📄 config.local.py (excluded)
📁 data/
📄 train.csv

Step 1 — Configure a Deployment Server

ℹ️
Two ways to open the Deployment configuration:
Via menu: Tools → Deployment → Configuration… (quickest)
Via Settings: Settings → Build, Execution, Deployment → Deployment
1
Tools → Deployment → Configuration — click + in the upper-left corner → SFTP

Enter a name for the server (e.g., AWS) and click OK.

2
Next to SSH configuration, click the three dots → click + in the SSH dialog

Fill in the SSH connection details for your AWS instance:

FieldValue
HostYour instance's IPv4 Public IP
Port22
Usernameubuntu
Authentication typeKey pair
Private key filePath to your .pem file

Click Test Connection to verify. Click the pencil icon above the left column and rename the connection to AWS. Click OK.

💡
If you already configured the SSH connection in Module 6, select it from the dropdown here — no need to re-enter credentials.
3
Set the Root path and click OK

Set the Root path to the base directory on your AWS instance (e.g., /home/ubuntu/projects). Click OK to save the deployment server configuration.

Settings — Deployment
Build, Execution, Deployment
🚀 Deployment
📡 Remote SSH
🐋 Docker
Deployment Servers
📡My Remote Server (SFTP)● Default
Connection Mappings Excluded Paths
Local PathRemote Path
~/projects/my_project/home/user/projects/my_project
~/projects/my_project/data/scratch/user/data
+ Add Mapping
CancelOK

Step 2 — Set Path Mappings

2
Click the "Mappings" tab in the Deployment configuration

Add a mapping that tells PyCharm which local folder corresponds to which remote folder:

Local PathDeployment Path
/Users/you/projects/my_project/home/netid/projects/my_project
/Users/you/projects/my_project/data/scratch/netid/data

You can have multiple mappings — for example, your main code folder maps to your home directory, but a large data folder maps to a scratch/data partition on the server.

Step 3 — Configure Excluded Paths

3
Click the "Excluded Paths" tab

Add any paths you do NOT want to upload to the server:

Upload Options

MethodHowWhen to use
Manual uploadRight-click file → Deployment → Upload to …One-off uploads
Upload allTools → Deployment → Upload to …Initial sync of whole project
Auto-upload on saveTools → Deployment → Options → Upload on explicit saveActive development on remote
Sync (compare)Tools → Deployment → Sync with Deployed …Check what differs before syncing
⚠️
Be careful with auto-upload on large projects or slow connections — every save will trigger an SFTP upload. Enable it only when you're actively developing on a remote target.

Remote File Browser

Go to Tools → Deployment → Browse Remote Host. A panel opens showing the remote file system:

🖥️ Remote Files — /home/netid/projects/my_project
📁 ..
📁 datadrwxr-xr-x
📁 modelsdrwxr-xr-x
📄 main.py-rw-r--r-- 2.4 KB
📄 utils.py-rw-r--r-- 1.1 KB
📄 requirements.txt-rw-r--r-- 128 B
📄 train_output.log-rw-r--r-- 48 KB

From this browser you can:

Compare Local vs Remote

Right-click any local file → Deployment → Compare with Deployed Version. PyCharm shows a diff of the local file vs what's currently on the server — useful to confirm you haven't forgotten to upload something.

ℹ️
You can also run Tools → Deployment → Sync with Deployed to… to get a complete side-by-side comparison of the local and remote project folders, with checkboxes to selectively sync individual files.
🎯 TaskModule 7 — AWS Deployment & File Sync
  • Tools → Deployment → Configuration → + → SFTP → name it AWS
  • Configure SSH: IPv4 Public IP, username ubuntu, Key pair (.pem file), Test Connection
  • Set a path mapping: local project folder → remote directory on AWS
  • Right-click a Python file → Deployment → Upload — verify it appears on the AWS instance
  • Open Tools → Deployment → Browse Remote Host and explore the AWS file tree
  • Use Tools → Deployment → Sync with Deployed to compare local and remote files
⌨️
Reference

PyCharm Shortcut Cheat Sheet

Running & Debugging
Run file⌃R / Shift+F10
Debug file⌃D / Shift+F9
Step OverF8
Step IntoF7
Step Out⇧F8 / Shift+F8
Resume program⌘⌥R / F9
Evaluate expression⌥F8 / Alt+F8
Toggle breakpoint⌘F8 / Ctrl+F8
Stop⌘F2 / Ctrl+F2
Navigation
Search Everywhere⇧⇧ / Shift+Shift
Go to file⌘⇧O / Ctrl+Shift+N
Go to class⌘O / Ctrl+N
Go to symbol⌘⌥O / Ctrl+Alt+Shift+N
Go to definition⌘B / Ctrl+B
Find usages⌥F7 / Alt+F7
Go to line⌘L / Ctrl+G
Back / Forward⌘[ / ⌘] / Ctrl+Alt+←/→
Recent files⌘E / Ctrl+E
Editing
Auto-complete⌃Space / Ctrl+Space
Reformat code⌘⌥L / Ctrl+Alt+L
Comment line⌘/ / Ctrl+/
Duplicate line⌘D / Ctrl+D
Delete line⌘⌫ / Ctrl+Y
Move line up/down⇧⌘↑/↓ / Shift+Alt+↑/↓
Rename (refactor)⇧F6
Surround with⌘⌥T / Ctrl+Alt+T
Quick fix⌥↩ / Alt+Enter
Git
Commit⌘K / Ctrl+K
Push⌘⇧K / Ctrl+Shift+K
Pull⌘T / Ctrl+T
Git log⌘9 → Log / Alt+9
Annotate (blame)Gutter right-click
Revert file⌘⌥Z / Ctrl+Alt+Z
Compare with branchGit → Compare with Branch
Tool Windows
Project panel⌘1 / Alt+1
Bookmarks⌘2 / Alt+2
Run panel⌘4 / Alt+4
Debug panel⌘5 / Alt+5
Git panel⌘9 / Alt+9
Terminal⌥F12 / Alt+F12
Python consoleTools → Python Console
Settings⌘, / Ctrl+Alt+S
Hide all panels⇧⌘F12 / Ctrl+Shift+F12
Search & Replace
Find in file⌘F / Ctrl+F
Replace in file⌘R / Ctrl+R
Find in project⌘⇧F / Ctrl+Shift+F
Replace in project⌘⇧R / Ctrl+Shift+R
Next occurrence⌘G / F3
Highlight usages⌘⇧F7 / Ctrl+Shift+F7
💡
Customize any shortcut: Settings → Keymap. Search for an action by name and double-click to add or change its shortcut. You can export your keymap to share across machines.