title: Deploy to Azure Web App runs successfully on GitHub Actions but still ModuleNotFoundError on Azure Web App
body: <p>We deploy to our Web App using GitHub Actions and Azure Web App template provided <a href="https://github.com/Azure/actions-workflow-samples/blob/master/AppService/python-webapp-on-azure.yml" rel="nofollow noreferrer">here</a>.</p>
  <p>Everything runs successfully on GitHub Actions and the deploy as well, but we still get an error on our Web App looking at the logs.</p>
  <p>Our deploy YAML:</p>
  <pre class="lang-yaml prettyprint-override"><code>name: My App
  on:
    push:
      branches:
        - main
  env:
    AZURE_WEBAPP_NAME: my-app
    AZURE_WEBAPP_PACKAGE_PATH: '.'
    PYTHON_VERSION: '3.8' # supports 3.6, 3.7, 3.8)
  jobs:
    build-and-deploy-to-Azure:
      runs-on: ubuntu-latest
      steps:
      - name: 'Checkout GitHub Action'
        uses: actions/checkout@master
      - name: Setup Python ${{ env.PYTHON_VERSION }} Environment
        uses: actions/setup-python@v2
        with:
          python-version: ${{ env.PYTHON_VERSION }}
      - name: 'Install dependencies'
        run: |
          python -m pip install --upgrade pip
          git config --global url.&quot;https://${{ secrets.ACCESS_TOKEN }}@github&quot;.insteadOf https://github
          pip install -r requirements.txt
      - name: 'Deploy to Azure WebApp'
        uses: azure/webapps-deploy@v2
        with:
          app-name: ${{ env.AZURE_WEBAPP_NAME }}
          package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
          publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
  </code></pre>
  <p>Last few lines of step <code>Install dependencies</code>:</p>
  <pre><code>Successfully installed Faker-6.1.1 Flask-1.1.2 Flask-Bcrypt-0.7.1 Flask-Bootstrap-3.3.7.1 Flask-Cors-3.0.10 Flask-Dropzone-1.5.4 Flask-Login-0.5.0 Flask-Mail-0.9.1 Flask-SQLAlchemy-2.4.4 Flask-WTF-0.14.3 Jinja2-2.11.3 MarkupSafe-1.1.1 SQLAlchemy-1.3.23 Six-1.15.0 WTForms-2.3.3 Werkzeug-1.0.1 bcrypt-3.2.0 blinker-1.4 cffi-1.14.5 click-7.1.2 dnspython-2.1.0 dominate-2.6.0 email-validator-1.1.2 et-xmlfile-1.0.1 idna-3.1 itsdangerous-1.1.0 jdcal-1.4.1 numpy-1.20.1 openpyxl-3.0.6 pandas-1.2.2 pycparser-2.20 pyodbc-4.0.30 python-dateutil-2.8.1 python-dotenv-0.15.0 pytz-2021.1 steekproef-0.0.1 text-unidecode-1.3 visitor-0.1.3 xlrd-2.0.1 xlsxwriter-1.3.7
  </code></pre>
  <p>Then lastly, the error on our app:</p>
  <pre><code>2021-02-15T16:51:47.899495269Z   File &quot;/home/site/wwwroot/app.py&quot;, line 1, in &lt;module&gt;
  2021-02-15T16:51:47.899499469Z     from my_app import app
  2021-02-15T16:51:47.899503270Z   File &quot;/home/site/wwwroot/my_app/__init__.py&quot;, line 2, in &lt;module&gt;
  2021-02-15T16:51:47.899507570Z     from flask_login import LoginManager
  2021-02-15T16:51:47.899511570Z ModuleNotFoundError: No module named 'flask_login'
  </code></pre>
  <p>What am I missing here that every step in my deployment goes correctly, while still the app cannot find the dependencies which are installed during deployment?</p>