在Windows 平台,使用到 selenium-wire 元件,執行時會出現錯誤訊息:
import _brotli importerror dll load failed
或:
ImportError: DLL load failed while importing _brotl
解法:
Microsoft Visual C++ Redistributable packages安裝檔下載:
https://docs.microsoft.com/en-GB/cpp/windows/latest-supported-vc-redist?view=msvc-170
根據自己的Windows環境(Arm/x86/x64)進行安裝, 不知道要安裝那一個,就選 x64 這一個。
Architecture | Link | Notes |
---|---|---|
ARM64 | https://aka.ms/vs/17/release/vc_redist.arm64.exe | Permalink for latest supported ARM64 version |
X86 | https://aka.ms/vs/17/release/vc_redist.x86.exe | Permalink for latest supported x86 version |
X64 | https://aka.ms/vs/17/release/vc_redist.x64.exe | Permalink for latest supported x64 version. The X64 Redistributable package contains both ARM64 and X64 binaries. This package makes it easy to install required Visual C++ ARM64 binaries when the X64 Redistributable is installed on an ARM64 device. |