如何安装python-Levenshtein windows

时间:2013-01-31 21:33:23

标签: python windows-8 levenshtein-distance

我看到有一个类似的问题是关于在python中安装levenshtein,但是被指示由另一个用户启动我自己的,所以就这样了。

我正在运行Windows 8 64位。当我尝试安装Levenshtein时,我收到以下错误。

C:\Python27\Lib\site-packages\python-Levenshtein-0.10.2>python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to python_Levenshtein.egg-info\requires.txt
writing python_Levenshtein.egg-info\PKG-INFO
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt

writing top-level names to python_Levenshtein.egg-info\top_level.txt
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'docs'
warning: no previously-included files matching '*pyc' found anywhere in distribu
tion
warning: no previously-included files matching '.project' found anywhere in dist
ribution
warning: no previously-included files matching '.pydevproject' found anywhere in
 distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_ext
building 'Levenshtein' extension
error: Unable to find vcvarsall.bat

我被指示安装设置工具,我已经完成了。和

一样
  

http://www.microsoft.com/en-us/download/details.aspx?id=6506运行它下载vcsetup.exe

     

完成后打开command.exe

     

输入:easy_install python-Levenshtein(假设你已经有了setuptools)

但是,当我输入“easy_install”时,我收到以下消息。我也对措辞感到困惑。我应该指向setup.py?

C:\Python27\Lib\site-packages\python-Levenshtein-0.10.2>easy_install python-Leve
nshtein
'easy_install' is not recognized as an internal or external command,
operable program or batch file.

1 个答案:

答案 0 :(得分:0)

发生easy_install的问题是因为您的python脚本文件夹不在PATH中。只需将以下内容添加到PATH:

 C:\Python27\Scripts

关于您最初的问题,您应该查看this question的答案。