GVKun编程网logo

Win7 64 位编译 Python 扩展解决”error: Unable to find vcvarsa

9

本文将介绍Win764位编译Python扩展解决”error:Unabletofindvcvarsa的详细情况,。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一些关

本文将介绍Win7 64 位编译 Python 扩展解决”error: Unable to find vcvarsa的详细情况,。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一些关于CentOS7.5 安装 Python3.7 报错:configure: error: no acceptable C compiler found in $PATH --Python3、Error: Can‘t find Python executable “python“, you can set the PYTHON env variable、error: Unable to find vcvarsall.bat、linux 编译错误 configure: error: no usable python found at /usr/bin/python2.7的知识。

本文目录一览:

Win7 64 位编译 Python 扩展解决”error: Unable to find vcvarsa

Win7 64 位编译 Python 扩展解决”error: Unable to find vcvarsa

Python 编译扩展命令 python setup.py install 但命令总是失败,出现 error: Unable to find vcvarsall.bat

参照 http://wangye.org/blog/archives/738/  

按照如下设置解决问题。

set DISTUTILS_USE_SDK=1
set MSSdk=1
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64


CentOS7.5 安装 Python3.7 报错:configure: error: no acceptable C compiler found in $PATH --Python3

CentOS7.5 安装 Python3.7 报错:configure: error: no acceptable C compiler found in $PATH --Python3

1、问题解析

报错信息中有这样一条:configure: error: no acceptable C compiler found in $PATH 即:配置错误,在 $path 中找不到可接受的 C 编译器

2、解决方式

安装 C 编译器 gcc (GNU 编译器套件):

yum -y install gcc

3、扩展

gcc 即:GNU 编译器套件 (GNU Compiler Collection) 包括 C、C++、Objective-C、Fortran、Java、Ada Go 语言的前端,也包括了这些语言的库(如 libstdc++、libgcj 等等)。GCC 的初衷是为 GNU 操作系统专门编写的一款编译器.

 

Error: Can‘t find Python executable “python“, you can set the PYTHON env variable

Error: Can‘t find Python executable “python“, you can set the PYTHON env variable

在启动vue项目的时候,安装node.js组件node-sass过程中报错了,错误提示如下
Error: Can’t find Python executable “python”, you can set the PYTHON env variable

由错误提示可知:Node.js 在安装模块组件node-sass的时候,node.js缺少Visual Studio2015 Build Tools相关的组件和python的环境,如果安装了vs2015组件的小伙伴们就不用安装Visual Studio2015 Build Tools相应的组件,只用安装python2.7即可解决缺少的python组件的问题。

欲安装python2.7,请至python官网:www.python.org 下载,然后配置好python的环境变量即可。

不过博主我并不推荐上述的解决方案,因为对于程序员来说,效率第一,上述的问题一个命令就可以轻松解决你所遇到的麻烦,前面说了那么多,无非就是想告诉在看本篇博客的同仁们放下浮躁的心,遇到问题首先不是急着去解决问题,而是分析为什么会这样,然后才能水到聚成的去找到解决问题的方法。

运行下面这个命令即可解决你们遇到的Error问题

npm install --global --production windows-build-tools

:上面讲述了一堆就是为了讲述此命令是干嘛的,上面已经描述很详细了,就不再赘述了,该操作与上述的一堆操作无异,效果却是一样的。

然后运气不好的小伙伴可能接着会遇到一个坑,那就是执行了:npm install --global --production windows-build-tools这个命令的人细心点会发现执行到一半就卡住了,这个卡住了没有红字重点提示,而且下方还有英文在等待中,粗心的小伙伴可能以为是命令执行完了,组件安装好了,其实不然,我这边已经解决了,就无法复现了,具体点就是中文的提示,提示我们由于有类似组件在运行或者下载导致无法继续下载安装组件了。稳妥点的解决办法是,将电脑重启,将底层正在运行的模块干掉,待电脑重启后再执行npm install --global --production windows-build-tools这条命令即可,博主我就是这样解决的,稳稳的幸福就会浮现在你面前如下图所示,你的可能和我不一样,因为我已经跑成功过一次了,没有你的那么多细节的log打印。
在这里插入图片描述

然后就是在你的项目下shift+鼠标右击你的项目运行npm run dev即可启动vue项目了。

error: Unable to find vcvarsall.bat

error: Unable to find vcvarsall.bat

我尝试安装 Python 包dulwich:

pip install dulwich

但我收到一条神秘的错误消息:

error: Unable to find vcvarsall.bat

如果我尝试手动安装软件包,也会发生同样的情况:

> python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat

linux 编译错误 configure: error: no usable python found at /usr/bin/python2.7

linux 编译错误 configure: error: no usable python found at /usr/bin/python2.7

源码编译时出现  configure: error: no usable python found at /usr/bin/python2.7 错误提示

原因是没有安装 python-devel 造成的

解决方案:

yum install python-devel -y

今天关于Win7 64 位编译 Python 扩展解决”error: Unable to find vcvarsa的讲解已经结束,谢谢您的阅读,如果想了解更多关于CentOS7.5 安装 Python3.7 报错:configure: error: no acceptable C compiler found in $PATH --Python3、Error: Can‘t find Python executable “python“, you can set the PYTHON env variable、error: Unable to find vcvarsall.bat、linux 编译错误 configure: error: no usable python found at /usr/bin/python2.7的相关知识,请在本站搜索。

本文标签: