报错解决办法: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“

目录

一、报错信息

二、解决办法


一、报错信息

安装pip库时候,报错如下:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

二、解决办法

1、首先下载:Microsoft Visual C++ Build Tools

地址:How to deal with the pain of "unable to find vcvarsall.bat" - Python (microsoft.com)

建议安装2019版本(2019下载地址:Create a network-based installation - Visual Studio (Windows) | Microsoft Learn

二、安装:使用C++的桌面开发

然后,安装“使用C++的桌面开发”并确保安装详细信息的前两项勾选

  • 使用C++的桌面开发
  • MSVC v143 -VS 2022 C++ x4/x86 生成工...
  • Windows 10 SDK(10.0.19041.0)

安装好后重新pip安装库即可。

猜你喜欢

转载自blog.csdn.net/qq_45100200/article/details/142109879