title: Missing required dependencies ['numpy'] in AWS Lambda after installing numpy into directory, how to fix?
body: <p>I am trying upload my python code into AWS Lambda. I have been following this guide to create the deployment package (<a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html" rel="noreferrer">https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html</a>). </p>
  
  <p>I have created a folder 'project-dir' on my desktop and moved my python file 'Twilio_Alerts_AWS.py' into the folder. I have used the command: </p>
  
  <pre><code>pip install module-name -t /path/to/project-dir
  </code></pre>
  
  <p>to install all my libraries into the folder. Next I highlighted everything and hit 'compress' by right clicking on the highlighted files in the folder. This produces one zipped file called 'archive'</p>
  
  <p>I put the <code>'archive.zip'</code> in a S3 bucket on AWS and called it into AWS Lambda. I keep getting error <code>Unable to import module 'Twilio_Alerts_AWS': Missing required dependencies ['numpy']
  </code> even though I have installed numpy into the folder. </p>
  
  <p>Not sure what I am doing wrong. </p>
  
  <p>Code I am trying to upload:</p>
  
  <pre><code>from twilio.rest import Client
  import time
  import datetime
  import requests
  import pandas as pd
  from pandas.io.json import json_normalize
  
  
  
  
  def lambda_handler(event, context):
      # Your Account SID from twilio.com/console
      account_sid = "xxx"
      # Your Auth Token from twilio.com/console
      auth_token  = "xxx"
  
      client = Client(account_sid, auth_token)
  
  
      current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
  
  
      headers = {
          'Accept': 'application/json',
          'Content-Type': 'application/json',
          'x-api-key': 'xxx',
          'x-organization-id': 'xxx',
          'x-facility-id': 'xxx',
          'x-user-id': 'xxx',
      }
  
  
  
      orders_staging_api_call = requests.get('URL', headers=headers, verify=False)
      consumers_staging_api_call = requests.get('URL', headers=headers, verify=False)
      inventory_staging_api_call = requests.get('URL', headers=headers, verify=False)
  
      lst = ["+1234567890"]
  
      ##Consumers API Alert
      if consumers_staging_api_call.status_code !=200:
          for i in lst:
              message = client.messages.create(
                      to=i, 
                      from_="+1234567890",
                      body="API connection between A and B has failed for: Consumers.Datetime of check:{}".format(current_datetime))
              time.sleep(5)
          print(message.sid)
      else:
          print('done')
  </code></pre>
  
  <p>edit: 
  using osx machine. </p>