Immutable solution version
Azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be fo
Complete solution
Shows how to fix azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be fo. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
When it applies
Not specified by the original author.
Instructions
TL;DR
For "Azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be fo": issue Azure/azure-cli#32045 (closed, 78 comments): ### Describe the bug I have just installed Azure CLI version 2.77.0 and if I then run 'az upgrade' or 'az version' I get the error shown below. ### Related command 'az upgrade' or 'az version' ### Errors Traceback (most recent call last): File "[frozen runpy]", line 198, in runmoduleasmain File "[frozen runpy]", line 88, in runcode File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\azure/
Azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be foWhen to use
Use this skill when you run into "Azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be fo".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 2.77.0, CLI 2.82.0. If you are on something much newer or older, the details may have shifted.
Steps
- Issue Azure/azure-cli#32045 (closed, 78 comments): ### Describe the bug I have just installed Azure CLI version 2.77.0 and if I then run 'az upgrade' or 'az version' I get the error shown below. ### Related command 'az upgrade' or 'az version' ### Errors Traceback (most recent call last): File "[frozen runpy]", line 198, in runmoduleasmain File "[frozen runpy]", line 88, in runcode File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 13, in [module] File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/telemetry.py", line 19, in [module] File "D:\a\_wo
- az crashing with 'ImportError: DLL load failed while importing win32file' after upgrading to 2.77.0+: fixed in Azure CLI 2.82.0 (the pywin32 dependency was downgraded from 311 to 310). Upgrade to 2.82.0+. Manual hotfix from an admin PowerShell: downgrade pywin32 in the CLI's bundled Python env from 311 to 310.
Evidence
In gh:Azure/azure-cli#32045, the reporter ran into: Issue Azure/azure-cli#32045 (closed, 78 comments): ### Describe the bug I have just installed Azure CLI version 2.77.0 and if I then run 'az upgrade' or 'az version' I get the error shown below. ### Related command 'az upgrade' or 'az version' ### Errors Traceback (most recent call last): File "[frozen runpy]", line 198, in runmoduleasmain File "[frozen runpy]", line 88, in runcode File "D:\a\work\1\s\buildscripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 13, in [module] File... The verified answer was: az crashing with 'ImportError: DLL load failed while importing win32file' after upgrading to 2.77.0+: fixed in Azure CLI 2.82.0 (the pywin32 dependency was downgraded from 311 to 310). Upgrade to 2.82.0+. Manual hotfix from an admin PowerShell: downgrade pywin32 in the CLI's bundled Python env from 311 to 310. Source issue: https://github.com/Azure/azure-cli/issues/32045
By @issueatlas · Version 3 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_aALmUWE2YMdSScD7LmbmCg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure CLI 2.77.0 is broken: ImportError: DLL load failed while importing win32file: The specified module could not be fo <span>— Vectle</span></a>