0

OS is Windows 7 Service Pack 1

python version is 3.5.0

pip version is 7.1.2

package link is https://pypi.org/project/python-Levenshtein/ according to which "Python 2.2 or newer is required; Python 3 is supported."

command is pip install python-Levenshtein

output below:

C:\Users\HP> pip install python-Levenshtein

Collecting python-Levenshtein
  Using cached https://files.pythonhosted.org/packages/2a/dc/97f2b63ef0fa1fd78dcb7195aca577804f6b2b51e712516cc0e902a9a201/python-Levenshtein-0.12.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\program files (x86)\python 3.5\lib\site-packages (from python-Levenshtein)
Installing collected packages: python-Levenshtein
  Running setup.py install for python-Levenshtein
    Complete output from command "c:\program files (x86)\python 3.5\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\HP\\AppData\\Local\\Temp\\pip-build-tdu_iv0a\\python-Levenshtein\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\HP\AppData\Local\Temp\pip-9i8823r1-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.5
    creating build\lib.win32-3.5\Levenshtein
    copying Levenshtein\StringMatcher.py -> build\lib.win32-3.5\Levenshtein
    copying Levenshtein\__init__.py -> build\lib.win32-3.5\Levenshtein
    running egg_info
    writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
    writing entry points to python_Levenshtein.egg-info\entry_points.txt
    writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
    writing python_Levenshtein.egg-info\PKG-INFO
    writing top-level names to python_Levenshtein.egg-info\top_level.txt
    writing requirements to python_Levenshtein.egg-info\requires.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution
    writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
    copying Levenshtein\_levenshtein.c -> build\lib.win32-3.5\Levenshtein
    copying Levenshtein\_levenshtein.h -> build\lib.win32-3.5\Levenshtein
    running build_ext
    building 'Levenshtein._levenshtein' extension
    error: [WinError 2] The system cannot find the file specified

    ----------------------------------------
Command ""c:\program files (x86)\python 3.5\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\HP\\AppData\\Local\\Temp\\pip-build-tdu_iv0a\\python-Levenshtein\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\HP\AppData\Local\Temp\pip-9i8823r1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-build-tdu_iv0a\python-Levenshtein
You are using pip version 7.1.2, however version 21.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\HP>

I have installed packages before, and can't figure this out. Some might say this question has been answered here Why i Can't install Levenshtein package on Windows Python 3.8.1? but while in that case the output is telling to install Visual Studio C++ 14.0, in my case it doesn't.

And the package link I provided says it's a C module, not C++. Idk, maybe unlike python 3.5 (the version I am using), Visual Studio C++ 14.0 is needed by python 3.8 to install packages. Even if they are C not C++.

Please help me understand these kind of issues, so I don't get stuck in the future.

  • "You are using pip version 7.1.2, however version 21.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command." Did you try it ? – LCMa Apr 02 '21 at 10:05
  • yes and a whole other long output of errors comes. Should I post it? – Muhammad Usman Apr 02 '21 at 10:07
  • I have also tried, as suggested in some places pip install --upgrade setuptools. Similar result. A very long complicated output, all about errors – Muhammad Usman Apr 02 '21 at 10:10
  • That's weird you get errors on upgrading pip. Can you post the error it raises ? – LCMa Apr 02 '21 at 10:13
  • You are using a version of Windows and a version of Python that are both out of support, so I'm afraid problems are to be expected. `pip` no longer supports Python 3.5 (it uses Python syntax introduced in Python 3.6), so upgrading that won't work. If you are able to upgrade to a later version of Python, you may have more luck, but of course, later versions of Python may not support Windows 7. – Luke Woodward Apr 02 '21 at 12:06

0 Answers0