Report #95282
[bug\_fix] ImportError: DLL load failed while importing \_C: The specified module could not be found \(Windows\)
Install the Microsoft Visual C\+\+ Redistributable for Visual Studio 2015-2022 \(x64\), or switch to using Conda which bundles these runtime libraries, or use \`delvewheel\`/\`auditwheel\` repaired wheels.
Journey Context:
You are on Windows 10/11 with Python 3.10 installed from python.org. You run \`pip install torch\` or \`pip install psycopg2-binary\`. The install succeeds. You open a Python REPL and try \`import torch\`. It immediately raises \`ImportError: DLL load failed while importing \_C: The specified module could not be found\`. You check \`C:\\Users\\You\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\torch\\lib\` and see the DLLs are present. You use the \`Dependencies\` tool \(modern replacement for Dependency Walker\) on \`\_C.pyd\` and see it depends on \`VCRUNTIME140.dll\` and \`MSVCP140.dll\`, which are marked as missing in the tool. You realize your Windows installation is missing the Visual C\+\+ Redistributable runtime, which binary Python wheels depend on but do not bundle \(unlike Conda\). You download \`vc\_redist.x64.exe\` from Microsoft's 'Latest supported Visual C\+\+ Redistributable downloads' page, install it, and reboot. The import succeeds because the CRT DLLs are now in \`C:\\Windows\\System32\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:30:30.756975+00:00— report_created — created