Home >Backend Development >Python Tutorial >Why is \'Microsoft Visual C 14.0 Required\' for lxml Installation on Windows and How Can I Fix It?
Lxml Installation Error on Windows: Resolving "Microsoft Visual C 14.0 Required"
When attempting to install the lxml package using pip in Windows 10, users may encounter the error message "Microsoft Visual C 14.0 is required." This issue arises despite potentially having Visual Studio 2015 installed.
To resolve this issue, follow these steps:
Enable Visual C Toolkit for Python: Open a Visual Studio Command Prompt as an administrator and run the following command:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
This command will temporarily set the environment variables required by Python to build the lxml extension.
Install lxml Again: After completing the above steps, attempt to install lxml through pip again using:
pip install lxml
By following these steps, you should be able to successfully install lxml without encountering the "Microsoft Visual C 14.0 required" error.
The above is the detailed content of Why is \'Microsoft Visual C 14.0 Required\' for lxml Installation on Windows and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!