python Unable to find vcvarsall.bat 错误
今天遇到了这个方面的问题,目前找到两种办法。一种是换编译器如mingw,另一种是装vc。第一种方法没成功,现在正在等第二种。
第一种:
首先安装MinGW;
把MinGW的路径添加到环境变量path中,比如MinGW安装在D:\MinGW\中,就把D:\MinGW\bin添加到path中;
打开命令行窗口,在命令行窗口中进入到要安装代码的目录下;
输入如下命令就可以安装了。setup.py install build --compiler=mingw32
第二种:
今天在安装pyscopg2库的时候出现Unable to find vcvarsall.bat错误,在网上找了一会儿,有人说是要装mingw来解决,我试了,但是不行后来找到另一种解决办法:
1、到http://www.microsoft.com/express/Downloads/#2008-Visual-CPP去下载visual c++ 2008 express edition
2、然后安装,之后再重新python setup.py install就好了
这个应该是个通用的方法,假如你在安装其他库的时候也遇到 Unable to find vcvarsall.bat错误的时候,应该也可以解决
我的以上方法都不管用,看到stackoverflow有一种方法:
For Windows installations:
While running setup.py for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py
.
If you have Visual Studio 2010 installed, execute
SET VS90COMNTOOLS=%VS100COMNTOOLS%
or with Visual Studio 2012 installed
SET VS90COMNTOOLS=%VS110COMNTOOLS%
我的是vs2010,在cmd下设置一下变量就可以了。
python 2.7在setup的时候查找的是VS2008编译的。果你电脑上没有这个版本的话,比如只有:
1.Visual
Studio
2010
,在cmd里面执行:
SET
VS90COMNTOOLS
=
%
VS100COMNTOOLS
%
2.
Visual Studio
2012
的话:
SET
VS90COMNTOOLS
=
%
VS110COMNTOOLS
%
以此类推:
3.
Visual Studio
2013
的话:
SET
VS90COMNTOOLS
=
%
VS120COMNTOOLS
%
4.
Visual Studio
2003
的话:
SET
VS90COMNTOOLS
=
%
VS80COMNTOOLS
%
更多参考:http://www.biaodianfu.com/python-error-unable-to-find-vcvarsall-bat.html
http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
python Unable to find vcvarsall.bat 错误的更多相关文章
- python easy_install 发生Unable to find vcvarsall.bat错误的处理方法
用python安装mmseg分词包时发生了 Unable to find vcvarsall.bat 错误 Searching for mmseg Reading http://pypi.python ...
- python---解决“Unable to find vcvarsall.bat”错误
安装某些module时发生常见的 Unable to find vcvarsall.bat 错误 在eddsn找到了“Unable to find vcvarsall.bat” error when ...
- 解决 Windows 编译 Fast R-CNN 的 bbox 和 nms 出现的错误 error: Unable to find vcvarsall.bat
在 Windows 下安装一个底层的 Python 包时(Fast R-CNN 的 bbox 和 nms),遇到 error: Unable to find vcvarsall.bat 错误,看到这个 ...
- error: Setup script exited with error: Unable to find vcvarsall.bat
安装mxnet python版本时遇到“Unable to find vcvarsall.bat”错误搜索一下后查到如下方法: python 3.5.2版本依赖高版本的vs解决办法是安装vs2015的 ...
- error: Unable to find vcvarsall.bat
http://www.crifan.com/python_mmseg_error_unable_to_find_vcvarsall_bat/ [已解决]安装Python模块mmseg出错:error: ...
- Windows 下安装Python包(Numpy)的错误:Unable to find vcvarsall.bat
情景简介: Windows 环境下安装Python2.7的Numpy扩展包时提示:error: Unable to find vcvarsall.bat 经过不懈的Google/Bing,发现不仅安装 ...
- python安装大型包时出现错误Unable to find vcvarsall.bat
在windows平台上,据说是安装cpython编写的包时会出现Unable to find vcvarsall.bat这种错误,缺失编译C的环境或组件吧,所以这个包就安装不成功,这个时候简单的方法就 ...
- Python error: Unable to find vcvarsall.bat
在安装一些Python模块时,大部分是cpython写的模块时会发生如下错误 error: Unable to find vcvarsall.bat.先前的一篇文章:在Windows上安装Scrapy ...
- Python科学计算(二)windows下开发环境搭建(当用pip安装出现Unable to find vcvarsall.bat)
用于科学计算Python语言真的是amazing! 方法一:直接安装集成好的软件 刚开始使用numpy.scipy这些模块的时候,图个方便直接使用了一个叫做Enthought的软件.Enthought ...
随机推荐
- android 数据持久化——I/O操作
上一节中简单的介绍了File的操作,这一节来说说使用android平台自带对象实现文件的基本操作 主要的两个类:openFileOutput(写)和openFileInput(读) 向文件中写如数据代 ...
- Android杂谈--ListView之BaseAdapter的使用
话说开发用了各种Adapter之后感觉用的最舒服的还是BaseAdapter,尽管使用起来比其他适配器有些麻烦,但是使用它却能实现很多自己喜欢的列表布局,比如ListView.GridView.Gal ...
- webform 不实用office控件导出excel StringBuilder 类型拼接字符串表格导出excel
StringBuilder sb = new StringBuilder(); sb.AppendLine("<meta http-equiv=\"Content-Type\ ...
- Android乐学成语之自定义Adapter
一.首先对Adapter概念深刻的了解 首先看看他的继承图
- spring+hibernate基础
把数据库的配置信息写在一个文件中 jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc\:mysql\://localhost\:3306/ ...
- XGPush集成(信鸽集成)demo
#import "AppDelegate.h" #import "XGPush.h" #import "XGSetting.h" #defi ...
- JavaSE复习日记 : 八种基本数据类型
/* * 基本数据类型 * * Java里的8种基本数据类型: * byte --- 1 byte = 8 bit; * short --- 2 byte = 16 bit; * int --- 4 ...
- Find the k-th Smallest Element in the Union of Two Sorted Arrays
(http://leetcode.com/2011/01/find-k-th-smallest-element-in-union-of.html) Given two sorted arrays A, ...
- RAW模板开发必备知识
写这个主要是为了让已经熟练掌握PHP的人能够快速的掌握RAW模板开发,从而享受RAW的优越! (注:在实际开发中,最好注意RAW模板开发统一规范,那样可以增强用户体验) 废话不多说,进入正题. 需要记 ...
- A Byte of Python 笔记(6)模块
第8章 模块 用户在程序中定义一次函数而重用代码,如果用户想在其他程序中重用很多函数,可以通过使用模块的方式. 模块就是一个包含了所有用户定义的函数和变量的文件.为了在其他程序中重用模块,模块的文件名 ...