Back to setup choices

Lesson 5 of 9 | 10 minutes

Create a Ceteris Lab Virtual Environment

Give this course its own clean package space.

After this lesson, you can

  • Create a project folder.
  • Create and activate .venv.
  • Install packages through the active interpreter.

1. Why use an environment?

A virtual environment is a separate package space for one course or project. It prevents unrelated projects from changing each other's package versions.

2. Create the folder and environment

Create the project folder
mkdir ceteris-python
cd ceteris-python
Windows
py -m venv .venv
macOS or Linux
python3 -m venv .venv

3. Activate it

Windows PowerShell
.venv\Scripts\Activate.ps1
Windows Command Prompt
.venv\Scripts\activate.bat
macOS or Linux
source .venv/bin/activate

4. Upgrade pip safely

python -m pip makes it clear which Python environment receives the package.

Use the active interpreter
python -m pip install --upgrade pip

Your setup progress

Five readiness checkpoints

0% complete