How do I write a salt state to pip install requirements file?

Question:

Can’t find this written down. I’m trying:

pip.install:
  - requirements: /path/to/requirements.txt

But I’m getting the error that

ID pip.install in SLS python.python-pip is not a dictionary

Many of the other ways include virtualenvs, but I don’t want to use a virtualenv to do this as it’s for a virtual machine, so there’s no point.

Asked By: David Boshton

||

Answers:

pip.installed

pip.installed:
  - requirements: /path/to/requirements.txt
Answered By: the.malkolm
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.