Skip to content

Module 2: Python Development Environment

The right tool for the right job — Choose the Python programming environment that suits you


Chapter Overview

The first step in learning Python is not rushing to write code, but choosing the right development environment. This chapter will introduce you to three mainstream Python programming environments, from beginner-friendly interactive notebooks, to powerful IDEs for professional developers, to zero-configuration cloud platforms.


Learning Objectives

After completing this chapter, you will be able to:

  • Understand the pros, cons, and use cases of different Python environments
  • Proficiently use Jupyter Notebook for data analysis
  • Configure VS Code as a professional Python IDE
  • Use AI programming assistants (Copilot, Cursor, Claude) to boost efficiency
  • Flexibly use cloud environments (Colab, Kaggle) for collaboration and GPU computing
  • Select the most appropriate tool based on task requirements

Chapter Contents

01 - Jupyter Notebook Quick Start

Target Audience: Beginners, data analysts, researchers

Core Content:

  • Interactive programming environment basics
  • Jupyter shortcuts and magic commands
  • Complete academic research workflow (data cleaning → analysis → export LaTeX tables)
  • JupyterLab extensions and advanced tips
  • Parallel computing, progress bars, performance profiling
  • Debugging techniques (pdb, error tracking)

Why Choose Jupyter?

  • Write and see results immediately, as intuitive as Stata
  • Mix code, charts, and text explanations (similar to R Markdown)
  • Ideal for exploratory data analysis (EDA) and prototyping
  • Academic mainstream: convenient for generating paper figures

02 - VS Code Setup Guide

Target Audience: Advanced learners, software developers, large projects

Core Content:

  • VS Code installation and Python extension configuration
  • Intelligent code completion (IntelliSense) and debugger
  • Interactive Window (use Jupyter within VS Code)
  • Project organization and workspace management
  • AI Programming Assistants Landscape:
    • GitHub Copilot (real-time code completion)
    • Cursor (AI-native IDE)
    • Claude Code (specialized for data analysis)
    • Google AI Studio (free Gemini Pro)
    • Aider (open-source CLI tool)
  • Comprehensive shortcuts and best practices

Why Choose VS Code?

  • Most powerful free IDE
  • Supports multi-file management, Git integration, powerful debugging
  • AI programming assistants make coding easier
  • Ideal for writing reusable Python scripts and packages

03 - Online Python Environments

Target Audience: Everyone (especially for GPU needs or collaboration scenarios)

Core Content:

  • Google Colab: Free GPU, Google Drive integration
  • Kaggle Notebooks: 30h/week free GPU, rich datasets, data competitions
  • Other Platforms: Paperspace, SageMaker Studio Lab, Binder, Deepnote
  • In-depth cloud platform comparison (resources, features, pricing)
  • Academic paper reproducibility workflow (using Binder)
  • GPU usage and cost optimization strategies
  • Data security and privacy protection

Why Choose Online Environments?

  • Zero configuration, ready to use in browser
  • Free GPU for deep learning
  • Code anywhere (mobile, tablet compatible)
  • Team collaboration and code sharing made easy

Three Environments Comparison

DimensionJupyter NotebookVS CodeOnline Env (Colab/Kaggle)
Learning Curve⭐⭐⭐⭐⭐ (Easiest)⭐⭐⭐ (Medium)⭐⭐⭐⭐⭐ (Easiest)
Interactive Analysis⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Large Projects⭐⭐⭐⭐⭐⭐⭐⭐⭐
Code Completion/Debug⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
GPU SupportNeed local hardwareNeed local hardwareFree provision
Collaboration⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Installation SetupNeed AnacondaNeed VS Code installZero config

How to Choose?

By Learning Stage

Week 1-2 (Beginner):

  • This website's Python environment (simplest)
  • Or Google Colab (online, no installation needed)

Week 3-4 (Intermediate):

  • Install Jupyter Notebook locally
  • Start running more complex analyses in Colab

Week 5+ (Professional):

  • Configure VS Code
  • Flexibly switch environments based on tasks

By Task Type

TaskRecommended EnvironmentReason
Learning Python BasicsThis website / JupyterInteractive, instant feedback
Data Analysis (EDA)Jupyter NotebookExplore and document simultaneously
Regression ModelingJupyter NotebookConvenient for generating tables and charts
Machine LearningJupyter / ColabDevelop in Jupyter, train in Colab
Deep LearningGoogle Colab / KaggleFree GPU
Large Projects (Multi-file)VS CodeCode completion, debugging, Git
Team CollaborationColab / DeepnoteReal-time sharing
Paper ReplicationJupyter + BinderOne-click execution

By Research Scenario

Typical Social Science Research Workflow:

1. Data Cleaning (Jupyter Notebook)

2. Exploratory Analysis (Jupyter Notebook)

3. Write Reusable Functions (VS Code)

4. Main Regression Analysis (Jupyter Notebook)

5. Robustness Checks (Jupyter Notebook)

6. Generate Paper Tables and Figures (Jupyter → LaTeX/PDF)

7. Code Replication (GitHub + Binder)

Learning Recommendations for This Chapter

If time is limited, follow this priority:

Must Learn (Week 1):

  • 01 - Jupyter Notebook basic operations
  • 03 - Google Colab quick start

Important (Week 2-3):

  • 01 - Jupyter magic commands and advanced tips
  • 02 - VS Code basic configuration

Enhancement (Week 4+):

  • 02 - AI programming assistants (Copilot/Cursor)
  • 03 - In-depth cloud platform comparison and cost optimization

Practice Recommendations

  1. Don't overthink choices: Beginners start with Jupyter, learn VS Code when proficient
  2. Hands-on practice: Complete all exercises in each article
  3. Find your rhythm: Use Jupyter for data analysis, VS Code for writing functions
  4. Leverage AI: But beginners shouldn't over-rely in first 3 months
  5. Keep it simple: Master one tool first, then expand to others

Next Steps

After completing this chapter, you will master:

  • Jupyter Notebook: Interactive data analysis
  • VS Code: Professional development environment + AI programming assistants
  • Cloud Platforms: Free GPU and team collaboration

In Module 3, we will start learning Python basic syntax and officially enter the programming world!

Ready? Choose your favorite environment and let's start the programming journey!


Released under the MIT License. Content © Author.