error: Microsoft Visual C++ 14.0 or greater is required (pip install)
TL;DRThis error appears when pip tries to install a Python package that needs to compile C++ code but cannot find the required Microsoft compiler tools on your Windows system.
Most likely cause: Microsoft Visual C++ Build Tools are not installed
Try first: Retry the pip install command after installation (pip install <package>)
Likely causes
- Microsoft Visual C++ Build Tools are not installedmost likely
- The package being installed has no pre-built wheel for your Python versionpossible
How to fix it
Safest first: SafeChanges settingsDangerous
Retry the pip install command after installationSafe
Open a new command prompt and run your original pip install command again.
pip install <package>Install the free Visual C++ Build ToolsChanges settings
Download the Build Tools for Visual Studio from the official Microsoft site and select the C++ build tools workload during installation.
⚠ This will download several gigabytes and modify your system.
If that didn't fix it
Try installing a different version of the package or use a pre-built wheel if one exists for your setup.
When to see a technician
Consult a technician if you are on a managed work computer where installing build tools is restricted by policy.
Related errors
codePython was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settingscodepip: error: externally-managed-environmentcodegyp ERR! find Python | gyp ERR! stack Error: Could not find any Python installation to usecodeAttributeError: 'NoneType' object has no attribute 'append'codeFileNotFoundError: [Errno 2] No such file or directory: 'config.json'codeNameError: name 'x' is not defined