How to install python-levenshtein on Windows?

好久不见. 提交于 2019-12-04 23:41:40

download vcsetup.exe from http://www.microsoft.com/en-us/download/details.aspx?id=6506 (sorry this link is now broken it was for VC++ 2008 ... )

run it

after it finishes open your command.exe

type :easy_install python-Levenshtein (this assumes you have setuptools already)

sit back and let it install

done

For a 64-bit install that's as easy as pip, try: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-levenshtein

if you use Anaconda, try:

conda install -c conda-forge python-levenshtein
user11604745

How to install python-Levenshtein/fuzzywuzzy on Windows 10 64 bit:

  1. Open a DOS window.

  2. C:\Users\username> pip install fuzzywuzzy

  3. C:\Users\username> pip install python-levenshtein

    If you encountered the following error:

    ERROR: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/down
    

    the solution is:

    1. From python Levenshtein wheels: https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-levenshtein, download the relevant .whl: python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl

    2. Create a wheels directory (or whatever name you like) under the Python37 directory: C:\Users\username\AppData\Local\Programs\Python\Python37\wheels

    3. Copy or move the python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl file from the download folder to the wheels folder.

    4. Use NotePad to create a .bat file in Python37 directory, C:\Users\username\AppData\Local\Programs\Python\Python37\pip_install_python-levenshtein.bat with the following lines (assuming C:\Users\username\AppData\Local\Programs\Python\Python37\python.exe is the root directory for Python.exe):

      cd C:\Users\sean3\AppData\Local\Programs\Python\Python37
      pip install --use-wheel --no-index --find-links=wheels wheels/python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl
      
    5. Run pip_install_python-levenshtein.bat:

      C:\Users\firstname.lastname\AppData\Local\Programs\Python\Python37> pip_install_python-levenshtein.bat >> output1.txt
      C:\Users\firstname.lastname> pip install fuzzywuzzy
      

      OUTPUT: Successfully installed python-Levenshtein-0.12.0

For the answer by @Laurenz Albe this helped me as you must delete the "--use-wheel" Docker: no such option: --use-wheel

output - Successfully installed python-Levenshtein-0.12.0
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!