easy_install遇上Unable to find vcvarsall.bat
2013-05-29 11:16
477 查看
首先说明这个方法并不是万能的,也查了些资料,说安装了vs这个是可以通过的,但我的电脑上貌似行不通,不管是微软的vs,还是玩魔兽的vs客户端都有还是行不通,也有可能是我装的是vs2010、vs2012版本太高了,所需要的文件没有了, 据说是要vs2008,这个我就没有去尝试啦,有兴趣的朋友可以去试下,记得把结果告诉我哈。
现在我们用另一种无需安装庞大的vs的方法
1、下载安装MinGW,下载地址为:http://sourceforge.net/projects/mingw/files/latest/download?source=files
2、在MinGW的安装目录下找到bin文件夹,找到mingw32-make.exe,复制一份更名为make.exe
3、把MinGW的路径添加到环境变量path中,比如我把MinGW安装到D:\MinGW\中,就把D:\MinGW\bin添加到path中;
4、在<python安装目录>\distutils增加文件distutils.cfg,在文件里输入
[build]
compiler=mingw32
保存;
5、执行原先的模块安装,发现还是报错,报错内容为:error: command ’gcc’ failed: No such file or directory 解决方案是将D:\MinGW\lib再添加到PATH中。
6、如果安装过程中出现 error: Could not find ‘openssl.exe’ 则直接到http://pypi.python.org/pypi/pyOpenSSL/0.13 下载安装即可。
6、再次执行时安装模块时,发现如下错误:
D:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall “-ID:\Program Files\Python27\inc
lude” “-ID:\Program Files\Python27\include” “-ID:\Program Files\Python27\PC” -c
../libdasm.c -o build\temp.win32-2.7\Release\..\libdasm.o
cc1.exe: error:unrecognized command line option ‘-mno-cygwin’
error: command ‘gcc’ failed with exit status 1
原因是gcc 4.6.x 以后不再接受-mno-cygwin为了解决这个问题需要修改<python安装目录>\distutils\cygwinccompiler.py文件。找到:
修改为:
至此,大功告成!
附MinGW
现在我们用另一种无需安装庞大的vs的方法
1、下载安装MinGW,下载地址为:http://sourceforge.net/projects/mingw/files/latest/download?source=files
2、在MinGW的安装目录下找到bin文件夹,找到mingw32-make.exe,复制一份更名为make.exe
3、把MinGW的路径添加到环境变量path中,比如我把MinGW安装到D:\MinGW\中,就把D:\MinGW\bin添加到path中;
4、在<python安装目录>\distutils增加文件distutils.cfg,在文件里输入
[build]
compiler=mingw32
保存;
5、执行原先的模块安装,发现还是报错,报错内容为:error: command ’gcc’ failed: No such file or directory 解决方案是将D:\MinGW\lib再添加到PATH中。
6、如果安装过程中出现 error: Could not find ‘openssl.exe’ 则直接到http://pypi.python.org/pypi/pyOpenSSL/0.13 下载安装即可。
6、再次执行时安装模块时,发现如下错误:
D:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall “-ID:\Program Files\Python27\inc
lude” “-ID:\Program Files\Python27\include” “-ID:\Program Files\Python27\PC” -c
../libdasm.c -o build\temp.win32-2.7\Release\..\libdasm.o
cc1.exe: error:unrecognized command line option ‘-mno-cygwin’
error: command ‘gcc’ failed with exit status 1
原因是gcc 4.6.x 以后不再接受-mno-cygwin为了解决这个问题需要修改<python安装目录>\distutils\cygwinccompiler.py文件。找到:
附MinGW
相关文章推荐
- 当easy_install遇上Unable to find vcvarsall.bat
- python easy_install 发生Unable to find vcvarsall.bat错误的处理方法
- easy_install和pip安装模块,提示error: Unable to find vcvarsall.bat的解决方法
- easy_install 错误Setup script exited with error: Unable to find vcvarsall.bat解决方法
- 用easy_install安装第三方模块提示:Unable to find vcvarsall.bat
- python easy_install 发生Unable to find vcvarsall.bat错误的处理方法
- easy_install 或者pip 安装时出现unable to find vcvarsall.bat解决方法
- 安装robotframewrok 的ssh库 pip install robotframework-sshlibrary 遇到 error: Unable to find vcvarsall.bat
- python setup.py install安装遇到问题:unable to find vcvarsall.bat
- error: Unable to find vcvarsall.bat while install python library by pip install or python setup.py install.
- pip install安装出现error:Unable to find vcvarsall.bat
- windows下 pip install 错误 error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
- pip install 报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
- python pip install报错error: Unable to find vcvarsall.bat
- 当出现error: Unable to find vcvarsall.bat该如何处理
- unable to find vcvarsall.bat
- error: Unable to find vcvarsall.bat
- Windows系统 安装Python扩展包时出现“Misrosoft Visual C++ 9.0 is required / Unable to find vcvarsall.bat”的解决办法
- 彻底解决 error: Unable to find vcvarsall.bat
- 配置Tensorlayer的时候安装出现unable to find vcvarsall.bat