【环境配置】出现:Microsoft Visual C++ 14.0 is required 的解决方案

时间:2024-10-27 17:16:33
由于windows开发经常出现这个问题,真是令人讨厌,于是得想个法子,干他娘的一炮,以绝后患,二营长,老子的意大利炮呢!

第一种情况

以安装scrapy为例:

如:pip install scrapy 时出现:

error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: /visual-cpp-build-tools

解决办法

1. 安装 Microsoft visual c++ 14.0

/fs/1445568-239446865

/s/1q2Nj41Xk85CHHv7_zOhQIA 密码:qbba

2. 如果出现了.Net framework版本过低,小于4.5的最低版本要求:
[如果没出现这个问题,跳过这一步]
  • 重新安装 .Net framework 更高的版本:

/en-us/help/3151800/the-net-framework-4-6-2-offline-installer-for-windows

  • 再安装Microsoft visual c++ 14.0,
3. 启动电脑,再安装scrapy
pip install scrapy

第二种情况

如安装pip install cnstd为例,出现:

Building wheels for collected packages: Polygon3
  Building wheel for Polygon3 () ... error
  error: subprocess-exited-with-error

  × Building wheel for Polygon3 () did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      NumPy extension not found - disabling support for it!
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\-amd64-cpython-310
      creating build\-amd64-cpython-310\Polygon
      copying Polygon\ -> build\-amd64-cpython-310\Polygon
      copying Polygon\ -> build\-amd64-cpython-310\Polygon
      copying Polygon\ -> build\-amd64-cpython-310\Polygon
      copying Polygon\__init__.py -> build\-amd64-cpython-310\Polygon
      running build_ext
      building '' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": /visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for Polygon3
Failed to build Polygon3
ERROR: Could not build wheels for Polygon3, which is required to install -based projects

解决办法

也不让你去网上找别的包了,别浪费时间了,意大利炮部署到位了,直接把下面的包安装mu_visual_cpp_build_tools_2015_update_3_x64_dvd_dfd9a39c.iso就行了
链接:/s/13VIivoo74HKqqbtAgvcg1Q
提取码:s9qd
这是一个iso文件,解压后,直接安装就可以了,完美解决