System Updated: 2025-11-30

Fix DLL Errors When Running Python (VCRUNTIME140, api-ms-win-crt)

Python won't start due to DLL errors? Learn how to fix common Visual C++ runtime issues that prevent Python from running.

By System Admin Team
Verified 2025-11-30

Common Python DLL Errors

When starting Python, you may see:

Error 1: python.exe - System Error `` The code execution cannot proceed because VCRUNTIME140.dll was not found. Reinstalling the program may fix this problem. `

Error 2: ` api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer `

Error 3: ` The code execution cannot proceed because MSVCP140.dll was not found. ``

These errors occur because Python 3.5+ requires the Microsoft Visual C++ Runtime.

Solution 1: Install Visual C++ Redistributable

Python 3.5 and later require Visual C++ 2015 or later:

Step 1: Download both versions: - VC++ 2015-2022 x64 (for 64-bit Python) - VC++ 2015-2022 x86 (for 32-bit Python)

Step 2: Install the version matching your Python architecture - If you have 64-bit Python → Install x64 - If you have 32-bit Python → Install x86 - If unsure → Install both

Step 3: Restart your computer

Step 4: Try running Python again

Solution 2: Install Windows Updates (api-ms-win-crt)

The api-ms-win-crt-runtime DLLs are part of Windows:

Windows 10/11: 1. Open Settings → Windows Update 2. Check for updates 3. Install all available updates 4. Restart computer

Windows 7/8.1: 1. Install KB2999226 (Universal C Runtime): - Go to Microsoft Update Catalog - Search for KB2999226 - Download for your Windows version

After updating Windows: Try running Python again. If still failing, reinstall Visual C++ Redistributable.

Solution 3: Reinstall Python

If installing VC++ doesn't help, reinstall Python:

Step 1: Uninstall current Python: - Control Panel → Programs → Uninstall Python

Step 2: Download fresh installer: - Go to python.org/downloads - Download the latest version

Step 3: Install with these options: - Check "Add Python to PATH" - Select "Customize installation" - Check "Install for all users"

Step 4: The Python installer should install required VC++ components automatically

Solution 4: Use Python from Microsoft Store

Alternative installation method that handles dependencies:

Step 1: Open Microsoft Store

Step 2: Search for "Python"

Step 3: Select "Python 3.x" published by Python Software Foundation

Step 4: Click "Get" to install

The Microsoft Store version automatically includes all required dependencies.

Note: Some advanced use cases may require the python.org version instead.

Solution 5: Portable/Embedded Python

If you can't install VC++ on the system:

Option 1: Portable Python Download WinPython or Python Portable, which bundles VC++ runtime

Option 2: Embedded Python Download the embeddable package from python.org: 1. Go to python.org/downloads/windows 2. Download "Windows embeddable package" 3. Extract to a folder 4. Includes minimal dependencies

Note: The embedded version doesn't include pip by default.

Related DLL Files

Related Guides