title: Azure Functions - Unable to import other python modules in called scripts
body: <p>I have created a simple HTTP trigger-based azure function in python which is calling another python script to create a sample file in azure data lake gen 1. My solution structure is given below: -</p>
  
  <p><a href="https://i.stack.imgur.com/5A8Bu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5A8Bu.png" alt="enter image description here"></a></p>
  
  <p>Requirements.txt contains the following imports: -</p>
  
  <ul>
  <li>azure-functions </li>
  <li>azure-mgmt-resource </li>
  <li>azure-mgmt-datalake-store</li>
  <li>azure-datalake-store</li>
  </ul>
  
  <p><strong>init.py</strong></p>
  
  <pre><code>import logging, os, sys
  
  import azure.functions as func
  import json
  
  def main(req: func.HttpRequest) -&gt; func.HttpResponse:
      logging.info('Python HTTP trigger function processed a request.')
      name = req.params.get('name')
      if not name:
          try:
              req_body = req.get_json()
          except ValueError:
              pass
          else:         
              name = req_body.get('name')
  
      if name:
          full_path_to_script = os.path.join(os.path.dirname( __file__ ) + '/Test.py')
          logging.info(f"Path: - {full_path_to_script}")
          os.system(f"python {full_path_to_script}")
          return func.HttpResponse(f"Hello {name}!")
      else:
          return func.HttpResponse(
               "Please pass a name on the query string or in the request body",
               status_code=400
          )
  </code></pre>
  
  <p><strong>Test.py</strong></p>
  
  <pre><code>import json
  from azure.datalake.store import core, lib, multithread
  
  directoryId = ''
  applicationKey = ''
  applicationId = ''
  adlsCredentials = lib.auth(tenant_id = directoryId, client_secret = applicationKey, client_id = applicationId)
  adlsClient = core.AzureDLFileSystem(adlsCredentials, store_name = '')
  
  with adlsClient.open('stage1/largeFiles/TestFile.json', 'rb') as input_file:
      data = json.load(input_file)
      with adlsClient.open('stage1/largeFiles/Result.json', 'wb') as responseFile:
          responseFile.write(data)
  </code></pre>
  
  <p>Test.py is failing with an error that <strong>no module found azure.datalake.store</strong>
  Why other required modules are not working for Test.py since it is inside the same directory?</p>
  
  <p><a href="https://i.stack.imgur.com/FASRH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FASRH.png" alt="enter image description here"></a></p>
  
  <p>pip freeze output: -</p>
  
  <pre><code>adal==1.2.2
  azure-common==1.1.23
  azure-datalake-store==0.0.48
  azure-functions==1.0.4
  azure-mgmt-datalake-nspkg==3.0.1
  azure-mgmt-datalake-store==0.5.0
  azure-mgmt-nspkg==3.0.2
  azure-mgmt-resource==6.0.0
  azure-nspkg==3.0.2
  certifi==2019.9.11
  cffi==1.13.2
  chardet==3.0.4
  cryptography==2.8
  idna==2.8
  isodate==0.6.0
  msrest==0.6.10
  msrestazure==0.6.2
  oauthlib==3.1.0
  pycparser==2.19
  PyJWT==1.7.1
  python-dateutil==2.8.1
  requests==2.22.0
  requests-oauthlib==1.3.0
  six==1.13.0
  urllib3==1.25.6
  </code></pre>