在没有 Visual Studio 的情况下为 python 安装 MS C++ 14.0

Installing MS C++ 14.0 for python without Visual Studio(在没有 Visual Studio 的情况下为 python 安装 MS C++ 14.0)
本文介绍了在没有 Visual Studio 的情况下为 python 安装 MS C++ 14.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在安装现有项目的一些 python 包,但出现此错误:

错误:需要 Microsoft Visual C++ 14.0.用微软Visual C++ 构建工具":https://visualstudio.microsoft.com/downloads/

我找到了一个解决方案,方法是在此处使用 Visual Studio 的产品之一安装它

如果上述方法仍然不能解决您的问题,您可以尝试切换到独立组件,向下滚动独立组件列表,有一个标题为 Compilers, build工具和运行时.在该部分下有一个 VC++ 2015.3 v140 桌面工具集 (x86,x64) 选项并选择它:

我已经安装了这两个,所以我无法确定安装哪一个来解决这个问题.

此外,有人提供了另一种解决方法来解决此问题,您可以检查它是否适合您:

<块引用>

一种方法是安装预编译的二进制文件.网页http://www.lfd.uci.edu/~gohlke/pythonlibs(镜像) 包含许多 Python 包的预编译二进制文件.下载后您感兴趣的软件包,您可以使用 pip install 安装它,例如pip install mysqlclient1.3.10cp35cp35mwin_amd64.whl.

您可以查看本文档和此线程了解更多详情.

希望这会有所帮助.

I am installing some python packages of an existed project and I am getting this error:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft
Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

I found a solution to that by installing it using one of the visual studio's products here StackOverflow answer, however, want to know if there is another way without needing to install more than 1.7 gb. PS: I installed the standalone MSbuild tools and didn't work for me.

解决方案

Installing MS C++ 14.0 for python without Visual Studio

To install Microsoft Visual C++ 14.0, you can download the Microsoft Build Tools for Visual Studio 2017, install and open it, select: WorkloadsVisual C++ build tools(Even you can only select only the "Windows 10 SDK"):

If above still not resolve your issue, you can try to switch to Individual components, scrolling down the list of Individual components, there was a section titled Compilers, build tools, and runtimes. Under that section there was a VC++ 2015.3 v140 toolset for desktop (x86,x64) option and select it:

I have installed both of them, so I can not make sure which one is installed to solve this issue.

Besides, someone give a another workaround to resolve this issue, you can check if it works for you:

One way around is to install precompiled binaries. The webpage http://www.lfd.uci.edu/~gohlke/pythonlibs (mirror) contains precompiled binaries for many Python packages. After downloading the package of interest to you, you can install it using pip install, e.g. pip install mysqlclient1.3.10cp35cp35mwin_amd64.whl.

You can check this document and this thread for some more details.

Hope this helps.

这篇关于在没有 Visual Studio 的情况下为 python 安装 MS C++ 14.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

patching a class yields quot;AttributeError: Mock object has no attributequot; when accessing instance attributes(修补类会产生“AttributeError:Mock object has no attribute;访问实例属性时)
How to mock lt;ModelClassgt;.query.filter_by() in Flask-SqlAlchemy(如何在 Flask-SqlAlchemy 中模拟 lt;ModelClassgt;.query.filter_by())
FTPLIB error socket.gaierror: [Errno 8] nodename nor servname provided, or not known(FTPLIB 错误 socket.gaierror: [Errno 8] nodename nor servname provided, or not known)
Weird numpy.sum behavior when adding zeros(添加零时奇怪的 numpy.sum 行为)
Why does the #39;int#39; object is not callable error occur when using the sum() function?(为什么在使用 sum() 函数时会出现 int object is not callable 错误?)
How to sum in pandas by unique index in several columns?(如何通过几列中的唯一索引对 pandas 求和?)