title: How to add win32com.client as a dependency in requirements.txt for a docker image?
body: <p>I am building a container with python script that sends an email using outlook. I am having trouble adding win32com to my container in the build process. It gives the error <code>No module named 'win32com'</code>. Can someone please help I can't find a solution online. Here's my code:</p>
  <p>email.py</p>
  <pre><code>import win32com.client as win32
  # import json
  from fastapi import FastAPI
  
  app = FastAPI() 
  
  
  @app.get(&quot;/&quot;)
  async def root():
      outlook = win32.Dispatch('outlook.application')
      mail = outlook.CreateItem(0)
      mail.To = 'bilalhussain.v1@gmail.com'
      mail.Subject = 'Testing Email Through Outlook'
      mail.Body = 'This shouldnot have taken this long'
      mail.HTMLBody = '&lt;h2&gt;Hello World&lt;/h2&gt;' #this field is optional
  
          # To attach a file to the email (optional):
      attachment  = &quot;find.json&quot;
      mail.Attachments.Add(attachment)
  
      mail.Send()
  </code></pre>
  <p>requirements.txt</p>
  <pre><code>certifi==2020.12.5
  click==7.1.2
  fastapi==0.63.0
  h11==0.11.0
  starlette==0.13.6
  uvicorn==0.13.3
  pywin32==304
  win32-setctime==1.0.3
  win32com 
  pypiwin32
  </code></pre>
  <p>Dockerfile</p>
  <pre><code>FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
  
  ADD find.json .
  ADD email.py .
  
  COPY requirements.txt .
  RUN pip --no-cache-dir install -r requirements.txt
  </code></pre>