VS Code Setup
Installing VS Code
Download and Install
- Download VS Code: Go to Visual Studio Code website
- Choose your platform:
- Windows: Download
.exe
installer - macOS: Download
.dmg
file - Linux: Download
.deb
(Ubuntu/Debian) or.rpm
(Red Hat/Fedora)
Recommended Extensions
Install these extensions for a complete data science setup:
- Python: Official Python extension with IntelliSense, debugging, and linting
- Ruff: Fast Python linter and formatter
- Jupyter: Native notebook support in VS Code
- Remote - SSH: Connect to remote machines via SSH
Remote SSH Extension Setup
Initial Configuration
Follow the SSH and Git Setup guide to configure your SSH connection to PACE.
- Install Remote SSH Extension:
ms-vscode-remote.remote-ssh
- Open Command Palette:
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(macOS) - Type: "Remote-SSH: Connect to Host"
- Enter Host: Use your PACE SSH configuration (e.g.,
pace
orpace-interactive
)
Remote Development Tips
Port Forwarding in VS Code
- Automatic Detection: VS Code detects running services and offers to forward ports
- Manual Forwarding:
- Open Command Palette (
Ctrl+Shift+P
) - Type "Ports: Focus on Ports View"
- Click "Forward a Port"
- Enter port number (e.g., 8888 for Jupyter)
Configuring Python Environment
Python Interpreter Selection
- Open Command Palette:
Ctrl+Shift+P
- Type: "Python: Select Interpreter"
- Choose from:
- System Python
- Virtual environments
Working with Jupyter Notebooks in VS Code
Native Jupyter Support
VS Code provides native Jupyter notebook support:
- Open
.ipynb
files directly in VS Code - Create new notebooks:
Ctrl+Shift+P
→ "Jupyter: Create New Jupyter Notebook" - Select kernel: Click kernel name in top-right corner
As long as you have Jupyter installed into your Python environment, you can run notebooks seamlessly. The Python environment is ideally a virtual environment.
Jupyter Server Configuration
Connect to Remote Jupyter Server
- Start Jupyter on PACE:
ssh pace-interactive
jupyter lab --no-browser --ip=0.0.0.0 --port=8888
- Connect VS Code:
- Open Command Palette (
Ctrl+Shift+P
) - Type "Jupyter: Specify Jupyter Server for Connections"
- Enter server URL:
http://localhost:8888
- Enter token from Jupyter output