2013-01-31 39 views
2

我看到有一個關於在Python中安裝levenshtein的類似問題,但被指示由另一個用戶啓動我自己的,所以在這裏。如何安裝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的蟒蛇 - 萊文斯坦(這裏假設你已經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. 
+0

嘗試[這個問題](http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat),[這個問題](http://stackoverflow.com/questions/2272786/python-issueunable-to-find-vcvarsall-bat?rq = 1)或[this question](http://stackoverflow.com/questions/2667069/cannot-find-vcvarsall-bat-when-running-a- Python的腳本)。 – ig0774

回答

0

easy_install的問題發生是因爲您的python腳本文件夾不在PATH中。只需將以下內容添加到PATH:

C:\Python27\Scripts 

有關您最初的問題,你應該看看的this question答案。