Menu

Installing Python

Introduction

Before we start learning, we'll need to install Python. We recommend using Python 3.12+ for this course.

Before continuing, let's review a few best practices:

  • Follow the directions closely and don't skip any sections.
  • Use the official Python installer or a version manager like pyenv.
  • Make sure python3 and pip3 are accessible from your terminal.

Lesson overview

  • Installing Python on your operating system.
  • Verifying your installation.
  • Setting up a virtual environment.

Assignment

  1. Windows: Download Python from python.org. Make sure to check "Add Python to PATH" during installation.
  2. macOS: Use Homebrew: brew install python
  3. Linux: Use your package manager: sudo apt install python3 python3-pip python3-venv
  4. Verify your installation by running python3 --version in your terminal.
  5. Create your first virtual environment: python3 -m venv myenv

Knowledge check

Support me!

I am a software engineer giving back to the community - my name is Musila Peter. Join me in empowering learners around the globe by supporting SaneGenius!