question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'adal'

See original GitHub issue
  • Package Name: azure-common
  • Package Version: 1.1.25
  • Operating System: Ubuntu 16.04.6 LTS
  • Python Version: 3.7

Describe the bug Attempting to use get_client_from_auth_file function from azure-common client_factory module leads to import error.

To Reproduce Steps to reproduce the behavior:

  1. pip install azure-common
  2. Import: from azure.common.client_factory import get_client_from_auth_file
  3. Error: ModuleNotFoundError: No module named ‘adal’

Expected behavior The adal package should be required when installing azure-common as it is imported and used in the code. Thus preventing a module not found error when using get_client_from_auth_file.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

from azure.common.client_factory import get_client_from_auth_file

../../../virtualenv/python3.7.1/lib/python3.7/site-packages/azure/common/client_factory.py:17: in <module>

    import adal

E   ModuleNotFoundError: No module named 'adal'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
smarlowucfcommented, Sep 24, 2020

Hi, @lmazuel thanks for the explanation. IMHO it’s not nice to force downstream packages to have dependencies on packages that really are used upstream. This can become very troublesome to properly manage. The downstream packages now have to add all this in their own requirements.txt:

azure-common
adal
msrestazure

Which is quite confusing and inaccurate because adal and msrestazure are not used in those packages directly.

0reactions
smarlowucfcommented, Jan 7, 2021

Hi @lmazuel can you please point me to documentation describing how to use the new authentication route? I’m very confused and have no luck finding any examples or docs. It would be helpful to see an entire workflow including authentication of a client. For example the code that worked before:

from azure.common.client_factory import get_client_from_auth_file
from azure.mgmt.compute import ComputeManagementClient


compute_client = get_client_from_auth_file(
    ComputeManagementClient,
    auth_path={auth_file...}
)
async_create_image = compute_client.images.create_or_update(...)

If get_client_from_auth_file is legacy then what is replacing this and what’s the new workflow?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'adal' - RoseIndia.Net
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'adal' How to remove the ModuleNotFoun.
Read more >
How to Install adal in Python? - Finxter
Type “ pip install adal ” (without quotes) in the command line and hit Enter again. ... How to Resolve ModuleNotFoundError: No module...
Read more >
adal - PyPI
The ADAL for Python library makes it easy for python application to authenticate to Azure Active Directory (AAD) in order to access AAD...
Read more >
which version of 'adal' module is supported in python 2.7.15?
I am trying to deploy a python code to Azure Function (Runtime ... ModuleNotFoundError: No module named 'adal' In requirement.txt i tried ...
Read more >
cloud-custodian/cloud-custodian - Gitter
... Result: Failure Exception: ModuleNotFoundError: No module named 'adal'. Troubleshooting Guide: https://aka.ms/functions-modulenotfound Stack: File ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found