---
# System prepended metadata

title: Install pip oneliner

---

# Install pip oneliner

Without `sudo` or `root` privileges.


```
resource "null_resource" "install_deps" {
  triggers = {
    archive_hash = data.archive_file.test_for_changes.output_sha
  }

  # can't install pip3 without sudo - https://github.com/pypa/get-pip/issues/43
  # installing pip instead
  provisioner "local-exec" {
    command = "wget --no-check-certificate --quiet https://bootstrap.pypa.io/get-pip.py -O - | python - --user"
  }

  provisioner "local-exec" {
    command = "$HOME/.local/bin/pip install -r ${path.module}/lambda/requirements.txt -t ${path.module}/lambda/requirements &> /dev/null"
  }
}
```

