`

python easy_install “Unable to find vcvarsall.bat

阅读更多
用python安装mmseg分词包时发生了 Unable to find vcvarsall.bat 错误

Searching for mmseg
Reading http://pypi.python.org/simple/mmseg/
Best match: mmseg 1.3.0
Downloading http://pypi.python.org/packages/source/m/mmseg/mmseg-1.3.0.tar.gz#md
5=ebf97c3d1cc541d0a2241f87174734d0
Processing mmseg-1.3.0.tar.gz
Running mmseg-1.3.0\setup.py -q bdist_egg --dist-dir c:\users\yukaiz~1\appdata\l
ocal\temp\easy_install-7ksgyu\mmseg-1.3.0\egg-dist-tmp-c7jx3g
error: Setup script exited with error: Unable to find vcvarsall.bat
在网上查了一些资料,最后找到的正确处理方式是安装mingw,mingw是sourceforge上的一个开源项目,编译器提供了很多种的编译器。

首先需下载mingw的安装包,然后安装mingw
假定mingw的安装目录为 c:\mingw 那么需要将c:\mingw\bin添加到Path系统变量中
下载easy_install指向的文件,通常为tar.gz,下载后解压缩,然后运行cmd打开命令窗口,然后切换到解压缩后的setup.py所在的目录
执行下面的命令
setup.py install build --compiler=mingw32
这样就可以解决easy_install “Unable to find vcvarsall.bat”错误的问题了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics