title: Python poetry - how to install optional dependencies?
body: <p>Python's poetry dependency manager allows specifying optional dependencies via command:</p>
  
  <pre><code>$ poetry add --optional redis
  </code></pre>
  
  <p>Which results in this configuration:</p>
  
  <pre><code>[tool.poetry.dependencies]
  python = "^3.8"
  redis = {version="^3.4.1", optional=true}
  </code></pre>
  
  <p>However how do you actually install them? Docs seem to hint to:</p>
  
  <pre><code>$ poetry install -E redis
  </code></pre>
  
  <p>but that just throws and error:</p>
  
  <pre><code>Installing dependencies from lock file
  
  [ValueError]
  Extra [redis] is not specified.
  </code></pre>