Skip to content

Python Setup Guide

Installing Python is only the first step. A usable development setup also needs environment isolation, predictable package installation, and a repeatable workflow.

Terminal window
mkdir my-python-project
cd my-python-project
Terminal window
python -m venv .venv

Using a project-local virtual environment keeps dependencies isolated and avoids contaminating the global interpreter.

Terminal window
.venv\Scripts\Activate.ps1
Terminal window
.venv\Scripts\activate
Terminal window
source .venv/bin/activate
Terminal window
python -m pip install --upgrade pip setuptools wheel
Terminal window
python -m pip install requests

List installed packages:

Terminal window
python -m pip list

For simple projects:

Terminal window
python -m pip freeze > requirements.txt

That is not the only packaging strategy, but it is a workable starting point for smaller repos and tutorials.

import requests
print("Environment is ready")

If you work inside an enterprise environment, your team may use an internal mirror or repository manager. In that case:

  • follow your teamโ€™s package index rules
  • configure the index URL intentionally
  • document the expected setup inside the project README
  • use one virtual environment per project
  • prefer python -m pip over bare pip
  • keep secrets out of source control
  • use formatting and linting early, not only at the end