> For the complete documentation index, see [llms.txt](https://htooaunklinn-organization.gitbook.io/htooaunklinn-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://htooaunklinn-organization.gitbook.io/htooaunklinn-docs/hardware-and-iot/python.md).

# Python

1. Install Python 3.11 via Homebrew:

   ```bash
   brew install python@3.11
   ```
2. Locate the Python installation:

   ```bash
   which python@3.11
   ```
3. Create and activate a virtual environment:

   ```bash
   /opt/homebrew/bin/python3.11 -m venv env

   source env/bin/activate
   ```
4. Install necessary packages:

   ```bash
   pip install opencv-python
   pip install mediapipe face-recognition
   ```
5. Export and install dependencies from `requirements.txt`:

   ```bash
   pip freeze > requirements.txt
   pip install -r requirements.txt
   ```
