Search code examples
pythonyamlsalt-project

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


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.


Solution

  • pip.installed

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