Setting Up Python Environment
Installing Python and setting up development environment
Interview Relevant: Basic knowledge expected
Setting Up Python
Getting Python ready on your machine is straightforward.
Installation
- Windows: Download the installer from python.org. Ensure you check "Add Python to PATH".
- macOS: Comes with Python, but recommend installing the latest version via Homebrew:
brew install python. - Linux: Usually pre-installed. Update via package manager:
sudo apt install python3.
Code Examples
Verifying Python installation in terminal.
bash
1# Check installation
2python --version
3# or
4python3 --version
5
6# Check pip (package manager)
7pip --version