Report #69061
[bug\_fix] ImportError: DLL load failed while importing \_ext: The specified module could not be found \(Windows\)
Install the Microsoft Visual C\+\+ Redistributable for Visual Studio 2015-2022 \(vcredist\_x64.exe\) from Microsoft's official support site. Alternatively, switch to Conda, which manages native C library dependencies \(DLLs\) within the environment.
Journey Context:
You set up a new Windows development machine and clone a repository requiring \`psycopg2\` or \`pandas\`. You create a virtual environment and run \`pip install -r requirements.txt\`, which completes without errors. However, when you execute \`import pandas\`, you receive an \`ImportError\` citing a DLL load failure for \`\_libs/lib.pyd\`. You verify the file exists in \`site-packages\`. You suspect a corrupt wheel and try \`pip install --force-reinstall\`, but the error persists. Searching the error message leads to Python Wiki pages explaining that C extensions built with MSVC require the Visual C\+\+ Redistributable runtime libraries \(\`MSVCP140.dll\`, \`VCRUNTIME140.dll\`\), which are not present on fresh Windows installs or minimal CI images. You download and install \`vc\_redist.x64.exe\` from Microsoft's official site, after which the import succeeds immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:24:10.156735+00:00— report_created — created