title: Azure Functions: In a Python function under Linux, how do I import a non-standard module such as opencv/imutils?
body: <p>I am trying to export my computer vision API, which is functioning correctly under macOS, to an Azure Function.</p>
  
  <p>I tried to use the docker approach:</p>
  
  <pre><code>func azure functionapp publish --build-native-deps
  </code></pre>
  
  <p>but I keep getting the error:</p>
  
  <pre><code>can't import cv2 and imutils
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rql9c.jpg" rel="nofollow noreferrer">log file</a></p>
  
  <p>and</p>
  
  <pre><code>Exception: ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>Here is the requirements.txt:</p>
  
  <p><a href="https://i.stack.imgur.com/KZfwH.png" rel="nofollow noreferrer">requirements.txt</a></p>
  
  <p>How do I solve this problem? Or must I switch to AWS Lambda?</p>
  
  <p>I have access to Kudu if that's helpful.</p>
  
  <p>Thanks in advance!</p>