Lesson 1 of 55 · Python
Installing Python and Setting Up Your Environment
Duration: 20 minutes
Lesson 1 of 55 · Python
Duration: 20 minutes
brew install python.\n- Linux: Most distributions already include Python 3. Use your package manager, e.g., sudo apt-get install python3 python3-venv on Debian/Ubuntu.\n\n## 2️⃣ Verify the installation\npython\nimport sys\nprint('Python version:', sys.version)\n\nOr simply run python --version in a terminal.\n\n## 3️⃣ Create a virtual environment\nA virtual environment isolates third‑party packages per project.\nbash\n# From your project folder\npython -m venv .venv\n\n# Activate it (Linux/macOS)\nsource .venv/bin/activate\n\n# Activate it (Windows)\n.\\venv\\Scripts\\activate\n\nNow any pip install will affect only this environment.\n\n## 4️⃣ Install an editor\nPopular choices include VS Code, PyCharm Community, and Sublime Text. VS Code works great with the Python extension for linting, debugging, and IntelliSense.\n\nOnce you have Python and a virtual environment set up, you’re ready to start coding!\n