On this page
article
Python IDEs & Editors
Set up VS Code, PyCharm, and Jupyter for Python development — extensions, debugging, linting, and workflow tips.
The right editor accelerates learning and productivity. This guide covers the three most popular choices for Python developers.
Visual Studio Code (Recommended)
Free, lightweight, and extensible — the most popular editor for Python.
Installation
- Download from code.visualstudio.com
- Install the Python extension by Microsoft (Ctrl+Shift+X → search “Python”)
- Also install: Pylance (bundled with Python ext), Python Debugger
Configure Python Interpreter
- Open your project folder (File → Open Folder)
- Ctrl+Shift+P → “Python: Select Interpreter”
- Choose your virtual environment:
.venv/bin/python
Recommended settings.json
{
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.analysis.typeCheckingMode": "basic",
"editor.rulers": [88]
}
Running Code
- Run file: click ▶ button top-right, or F5
- Integrated terminal: Ctrl+
thenpython script.py` - REPL: Ctrl+Shift+P → “Python: Start REPL”
Debugging
- Click left of line number to set a breakpoint (red dot)
- Press F5 → select “Python File”
- Use F10 (step over), F11 (step into), F5 (continue)
- Inspect variables in the left panel
Useful Extensions
| Extension | Purpose |
|---|---|
| Python (Microsoft) | Core support |
| Black Formatter | Auto-format on save |
| autoDocstring | Generate docstrings |
| GitLens | Git blame and history |
| Error Lens | Inline error display |
| Docker | Container management |
PyCharm
Full-featured IDE by JetBrains — best for large projects and Django/Flask development.
Editions
| Edition | Cost | Best For |
|---|---|---|
| Community | Free | General Python, learning |
| Professional | Paid | Django, Flask, databases, web |
Download: jetbrains.com/pycharm
Key Features
- Smart code completion and refactoring
- Integrated debugger with visual breakpoints
- Built-in terminal and Python console
- Database tools (Professional)
- Django/Flask project templates (Professional)
Create a Project
- File → New Project
- Select “Pure Python” or “Django” / “Flask”
- Set location and interpreter (create new venv)
- PyCharm auto-detects
requirements.txt
Run and Debug
- Green ▶ to run current file
- Right-click → Debug to start debugger
- Shift+F10 to run, Shift+F9 to debug
Jupyter Notebooks
Interactive environment — ideal for data exploration, ML experiments, and learning.
Installation
pip install jupyterlab
jupyter lab
# Opens browser at http://localhost:8888
Or use Google Colab (free, GPU available): colab.research.google.com
Basic Usage
- Cell: block of code or markdown
- Shift+Enter: run cell and move to next
- Ctrl+Enter: run cell and stay
- B: insert cell below (command mode)
- M: convert cell to markdown
# Code cell
import numpy as np
data = np.random.randn(1000)
data.mean()
# Markdown cell
## Analysis Results
The mean is approximately 0 due to the normal distribution.
When to Use Jupyter
| Use Jupyter | Use .py scripts |
|---|---|
| Data exploration | Production code |
| ML experiments | Web applications |
| Visualizations | CLI tools |
| Teaching/learning | Version-controlled modules |
Export notebooks to Python scripts: File → Save and Export → Python (.py)
Comparison
| Feature | VS Code | PyCharm | Jupyter |
|---|---|---|---|
| Cost | Free | Free/Paid | Free |
| Learning curve | Low | Medium | Low |
| Debugging | Good | Excellent | Limited |
| Data science | Good | Good | Excellent |
| Web dev | Good | Excellent | Poor |
| Extensions | Many | Built-in | Plugins |
Recommendation by Goal
- Learning Python → VS Code or Jupyter
- Web development → VS Code or PyCharm Professional
- Data science / ML → Jupyter + VS Code
- Large team projects → PyCharm
Next Steps
Pick one editor, configure it once, and focus on learning Python.