当你安装包遇到【 error: Microsoft Visual C++ 14.0 or greater is required】怎么办?

简介: 当你安装包遇到【 error: Microsoft Visual C++ 14.0 or greater is required】怎么办?

image.png

兄弟们,有没有遇到过【 error: Microsoft Visual C++ 14.0 or greater is required】怎么办?

经常遇到,这次就拿出来给大家看看!!!


1.遇到问题啦


我在兴致勃勃的安装包,什么?你居然安装不下来?

cmd

复制代码

pip install paddleocr paddlenlp paddlespeech moviepy

夸嚓,一下子,红颜色字就出来了,这怎么整?


Building wheel for webrtcvad (setup.py) ... error
  error: subprocess-exited-with-error
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      copying webrtcvad.py -> build\lib.win-amd64-cpython-39
      running build_ext
      building '_webrtcvad' extension
      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/
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for webrtcvad
  error: subprocess-exited-with-error
  × Running setup.py install for webrtcvad did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running install
      I:\miniconda3\envs\p2\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      copying webrtcvad.py -> build\lib.win-amd64-cpython-39
      running build_ext
      building '_webrtcvad' extension
      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/
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> webrtcvad
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.


2.网上的解决办法


查看错误信息,给出的是 error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": visualstudio.microsoft.com/visual-cpp-…

看出来是需要新版本的 Microsoft C++ Build Tools,并给出了地址,这个要记下来,接下来要考。 打开网址:visualstudio.microsoft.com/zh-hans/vis… ,Microsoft C++ 生成工具,独立 MSVC 编译器、库和脚本。直接下载就是。


3.安装Microsoft C++ 生成工具


点击单个组件,电机安装MSVC v143-VS 2022 C++ x64/86生成工具(最新),安装即可,接下来再试试。

image.png


4.原因剖析


4.1原版解释


Even though Python is an interpreted language, you may need to install Windows C++ compilers in some cases. Unlike Linux, compilers for Windows are not included by default in the OS.

For example, you will need to use them if you wish to:


4.2中文意思


尽管Python是一种解释型语言,但在某些情况下可能需要安装Windows c++编译器。与Linux不同,Windows的编译器在默认情况下不包括在操作系统中。 因此,你需要安装编译器

  • 用源码安装一个非纯python的包
  • 编译cython 或 Pyrex 文件

具体可以看python文档,说的比较细致: wiki.python.org/moin/Window… ,并给出了版本搭配。

Visual C++ CPython
14.x 3.5 - 3.10
10.0 3.3 - 3.4
9.0 2.6 - 2.7, 3.0 - 3.2

image.png


目录
相关文章
|
10月前
|
API C++ Windows
Visual C++运行库、.NET Framework和DirectX运行库的作用及常见问题解决方案,涵盖MSVCP140.dll丢失、0xc000007b错误等典型故障的修复方法
本文介绍Visual C++运行库、.NET Framework和DirectX运行库的作用及常见问题解决方案,涵盖MSVCP140.dll丢失、0xc000007b错误等典型故障的修复方法,提供官方下载链接与系统修复工具使用指南。
2116 2
|
C++ Windows
.NET Framework安装不成功,下载`NET Framework 3.5`文件,Microsoft Visual C++
.NET Framework常见问题及解决方案汇总,涵盖缺失组件、安装失败、错误代码等,提供多种修复方法,包括全能王DLL修复工具、微软官方运行库及命令行安装等,适用于Windows系统,解决应用程序无法运行问题。
1653 3
|
10月前
|
IDE 编译器 开发工具
msvcp100.dll,msvcp120.dll,msvcp140.dll,Microsoft Visual C++ 2015 Redistributable,Visual C++ 运行库安装
MSVC是Windows下C/C++开发核心工具,集成编译器、链接器与调试器,配合Visual Studio使用。其运行时库(如msvcp140.dll)为程序提供基础函数支持,常因缺失导致软件无法运行。通过安装对应版本的Microsoft Visual C++ Redistributable可解决此类问题,广泛应用于桌面软件、游戏及系统级开发。
1189 2
|
11月前
|
并行计算 C++ Windows
|
编译器 C++ 开发者
【C++篇】深度解析类与对象(下)
在上一篇博客中,我们学习了C++的基础类与对象概念,包括类的定义、对象的使用和构造函数的作用。在这一篇,我们将深入探讨C++类的一些重要特性,如构造函数的高级用法、类型转换、static成员、友元、内部类、匿名对象,以及对象拷贝优化等。这些内容可以帮助你更好地理解和应用面向对象编程的核心理念,提升代码的健壮性、灵活性和可维护性。
|
编译器 C++ 容器
【c++11】c++11新特性(上)(列表初始化、右值引用和移动语义、类的新默认成员函数、lambda表达式)
C++11为C++带来了革命性变化,引入了列表初始化、右值引用、移动语义、类的新默认成员函数和lambda表达式等特性。列表初始化统一了对象初始化方式,initializer_list简化了容器多元素初始化;右值引用和移动语义优化了资源管理,减少拷贝开销;类新增移动构造和移动赋值函数提升性能;lambda表达式提供匿名函数对象,增强代码简洁性和灵活性。这些特性共同推动了现代C++编程的发展,提升了开发效率与程序性能。
611 12
|
编译器 C语言 C++
类和对象的简述(c++篇)
类和对象的简述(c++篇)
|
设计模式 安全 C++
【C++进阶】特殊类设计 && 单例模式
通过对特殊类设计和单例模式的深入探讨,我们可以更好地设计和实现复杂的C++程序。特殊类设计提高了代码的安全性和可维护性,而单例模式则确保类的唯一实例性和全局访问性。理解并掌握这些高级设计技巧,对于提升C++编程水平至关重要。
316 16
|
人工智能 机器人 编译器
c++模板初阶----函数模板与类模板
class 类模板名private://类内成员声明class Apublic:A(T val):a(val){}private:T a;return 0;运行结果:注意:类模板中的成员函数若是放在类外定义时,需要加模板参数列表。return 0;
332 0