Python Tutorial 0/52 lessons ~6 min read Lesson 3
Installing Python
Install Python 3.11+ from python.org, or via pyenv (recommended for multi-version) or your OS package manager.
Course progress0%
Focus
9 guided sections
Practice signal
Examples included
Career prep
Foundation builder
Introduction
Install Python 3.11+ from python.org, or via pyenv (recommended for multi-version) or your OS package manager. Pair it with a virtual environment tool from day one.
Understanding the topic
Core concepts to understand:
- Use
pyenvto manage multiple Python versions. python -m venv .venvcreates an isolated env.- Activate per shell:
source .venv/bin/activate. - Verify:
python --version.
Syntax reference
Visual flow / code:
bash
# macOS / Linuxbrew install pyenvpyenv install 3.12.0pyenv global 3.12.0# Create project venvpython -m venv .venvsource .venv/bin/activatepip install --upgrade pip
Execution workflow
1Installing Python Workflow
1 / 4Step 1
Use pyenv to manage multiple Python versions.
Apply this step while implementing installing python in real code.
Real-world use
Every serious Python project ships with its own venv (or Poetry/uv). Never install packages globally on a dev machine — you'll regret it.
Best practices
- Always work inside a venv.
- Pin Python version with
.python-version. - Use
uvorpoetryfor modern projects.
Common mistakes
- Mixing system Python with project deps causes breakage.
Hands-on exercise
Interview preparation — practice these questions:
- Why use a virtual environment?
- Pyenv vs conda vs venv?
- How do you pin Python version?
Summary
In summary: Install 3.11+. One venv per project — no exceptions.
Ready to mark this lesson complete?Track your journey across the entire course.