title: Airflow on Docker missing Module "Google"
body: <p>I am using the puckel airflow image and upgraded the airflow version by editing the dockerfile which includes google and installed apache-airflow-providers-google 2.2.0 as a python dependency and google or gcs as an airflow dependency when I built the container using</p>
  <pre><code>`docker build --rm --build-arg AIRFLOW_DEPS=&quot;google&quot; --build-arg AIRFLOW_DEPS=&quot;google&quot; --build-arg PYTHON_DEPS=&quot;httplib2==0.18.1&quot; --build-arg PYTHON_DEPS=&quot;apache-airflow-providers-google==2.2.0&quot; -t puckel/docker-airflow .`
  </code></pre>
  <p>I also added the python packages to my requirements.txt file which is listed below but when I go to airflow on my localhost it still says &quot;Broken DAG: [/usr/local/airflow/dags/otherfolder/dag.py] No module named 'google'.&quot; How can I solve this?</p>
  <p>The following is my dockerfile where I changed the version</p>
  <pre><code># VERSION 1.10.9
  # AUTHOR: Matthieu &quot;Puckel_&quot; Roisil
  # DESCRIPTION: Basic Airflow container
  # BUILD: docker build --rm -t puckel/docker-airflow .
  # SOURCE: https://github.com/puckel/docker-airflow
  
  FROM python:3.7-slim-buster
  LABEL maintainer=&quot;Puckel_&quot;
  
  # Never prompt the user for choices on installation/configuration of packages
  ENV DEBIAN_FRONTEND noninteractive
  ENV TERM linux
  
  # Airflow
  ARG AIRFLOW_VERSION=1.10.14
  ARG AIRFLOW_USER_HOME=/usr/local/airflow
  ARG AIRFLOW_DEPS=&quot;&quot;
  ARG PYTHON_DEPS=&quot;&quot;
  ENV AIRFLOW_HOME=${AIRFLOW_USER_HOME}
  
  # Define en_US.
  ENV LANGUAGE en_US.UTF-8
  ENV LANG en_US.UTF-8
  ENV LC_ALL en_US.UTF-8
  ENV LC_CTYPE en_US.UTF-8
  ENV LC_MESSAGES en_US.UTF-8
  
  # Disable noisy &quot;Handling signal&quot; log messages:
  # ENV GUNICORN_CMD_ARGS --log-level WARNING
  
  RUN set -ex \
      &amp;&amp; buildDeps=' \
          freetds-dev \
          libkrb5-dev \
          libsasl2-dev \
          libssl-dev \
          libffi-dev \
          libpq-dev \
          git \
      ' \
      &amp;&amp; apt-get update -yqq \
      &amp;&amp; apt-get upgrade -yqq \
      &amp;&amp; apt-get install -yqq --no-install-recommends \
          $buildDeps \
          freetds-bin \
          build-essential \
          default-libmysqlclient-dev \
          apt-utils \
          curl \
          rsync \
          netcat \
          locales \
      &amp;&amp; sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen \
      &amp;&amp; locale-gen \
      &amp;&amp; update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
      &amp;&amp; useradd -ms /bin/bash -d ${AIRFLOW_USER_HOME} airflow \
      &amp;&amp; pip install -U pip setuptools wheel \
      &amp;&amp; pip install pytz \
      &amp;&amp; pip install pyOpenSSL \
      &amp;&amp; pip install ndg-httpsclient \
      &amp;&amp; pip install pyasn1 \
      &amp;&amp; pip install apache-airflow[crypto,celery,postgres,hive,jdbc,mysql,ssh${AIRFLOW_DEPS:+,}${AIRFLOW_DEPS}]==${AIRFLOW_VERSION} \
      &amp;&amp; pip install 'redis==3.2' \
      &amp;&amp; if [ -n &quot;${PYTHON_DEPS}&quot; ]; then pip install ${PYTHON_DEPS}; fi \
      &amp;&amp; apt-get purge --auto-remove -yqq $buildDeps \
      &amp;&amp; apt-get autoremove -yqq --purge \
      &amp;&amp; apt-get clean \
      &amp;&amp; rm -rf \
          /var/lib/apt/lists/* \
          /tmp/* \
          /var/tmp/* \
          /usr/share/man \
          /usr/share/doc \
          /usr/share/doc-base
  
  COPY script/entrypoint.sh /entrypoint.sh
  COPY config/airflow.cfg ${AIRFLOW_USER_HOME}/airflow.cfg
  COPY requirements.txt /requirements.txt
  
  RUN chown -R airflow: ${AIRFLOW_USER_HOME}
  
  EXPOSE 8080 5555 8793
  
  USER airflow
  WORKDIR ${AIRFLOW_USER_HOME}
  ENTRYPOINT [&quot;/entrypoint.sh&quot;]
  CMD [&quot;webserver&quot;]
  </code></pre>
  <p>The following is my docker compose file:</p>
  <pre><code>version: '3.7'
  services:
      postgres:
          image: postgres:9.6
          environment:
              - POSTGRES_USER=airflow
              - POSTGRES_PASSWORD=airflow
              - POSTGRES_DB=airflow
          logging:
              options:
                  max-size: 10m
                  max-file: &quot;3&quot;
  
      webserver:
          image: puckel/docker-airflow:1.10.9
          restart: always
          depends_on:
              - postgres
          environment:
              - LOAD_EX=n
              - EXECUTOR=Local
          logging:
              options:
                  max-size: 10m
                  max-file: &quot;3&quot;
          volumes:
              - ./dags:/usr/local/airflow/dags
              - ./requirements.txt:/requirements.txt
              # - ./plugins:/usr/local/airflow/plugins
          ports:
              - &quot;8080:8080&quot;
          command: webserver
          healthcheck:
              test: [&quot;CMD-SHELL&quot;, &quot;[ -f /usr/local/airflow/airflow-webserver.pid ]&quot;]
              interval: 30s
              timeout: 30s
              retries: 3
      python:
        image: python:rc-buster
    
  </code></pre>
  <p>the following is my requirements.txt file</p>
  <pre><code>httplib2==0.18.1
  google==3.0.0
  pandas==1.2.4
  apache-airflow-providers-google==2.2.0
  </code></pre>
  <p>The following is the relevant code from the dag:</p>
  <pre><code>import datetime
  import logging
  import dateutil
  import pandas as pd
  import numpy as np
  from airflow import models, utils
  from airflow.operators.python_operator import PythonOperator
  from airflow.contrib.operators.bigquery_to_gcs import BigQueryToCloudStorageOperator
  from airflow.operators.python_operator import BranchPythonOperator
  from airflow.contrib.hooks.bigquery_hook import BigQueryHook
  from airflow.contrib.operators.gcs_to_bq import GoogleCloudStorageToBigQueryOperator
  from airflow.operators.dummy_operator import DummyOperator
  
  from airflow.hooks.http_hook import HttpHook
  from pandas.io.json import json_normalize
  from pandas.errors import EmptyDataError
  from pathlib import Path
  from lz_warnings import *
  from utils import task_fail_slack_alert
  import warnings
  </code></pre>