gpt4 book ai didi

python - 无法在 Windows 上安装 python-Levenshtein,错误代码 1

转载 作者:行者123 更新时间:2023-12-04 14:22:51 26 4
gpt4 key购买 nike

当尝试为我正在做的项目安装 python-Levenshtein 时,我遇到了这个错误,我试图找到的所有关于它的信息似乎都是针对我没有遇到的涉及视觉的其他问题我没有为项目安装或使用的工作室和其他资源。

如有任何帮助,我们将不胜感激。谢谢。

    Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\user1>pip install python-Levenshtein
Collecting python-Levenshtein
Using cached https://files.pythonhosted.org/packages/42/a9/d1785c85ebf9b7dfacd
08938dd028209c34a0ea3b1bcdb895208bd40a67d/python-Levenshtein-0.12.0.tar.gz
Requirement already satisfied: setuptools in c:\users\user1\appdata\local\program
s\python\python37-32\lib\site-packages (from python-Levenshtein) (39.0.1)
Installing collected packages: python-Levenshtein
Running setup.py install for python-Levenshtein ... error
Complete output from command c:\users\user1\appdata\local\programs\python\pyt
hon37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user1
\\AppData\\Local\\Temp\\pip-install-fgsrabne\\python-Levenshtein\\setup.py';f=ge
tattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.cl
ose();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user1\AppD
ata\Local\Temp\pip-record-20u1vm40\install-record.txt --single-version-externall
y-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win32-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win32-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-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 requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in dist
ribution
warning: no previously-included files matching '*so' found anywhere in distr
ibution
warning: no previously-included files matching '.project' found anywhere in
distribution
warning: no previously-included files matching '.pydevproject' found anywher
e in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win32-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win32-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\Levenshtein
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\user1\appdata\local\pro
grams\python\python37-32\include -Ic:\users\user1\appdata\local\programs\python\p
ython37-32\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.
0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-I
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program
Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86
)\Windows Kits\NETFXSDK\4.6.1\include\um" /TcLevenshtein/_levenshtein.c /Fobuild
\temp.win32-3.7\Release\Levenshtein/_levenshtein.obj
error: command 'cl.exe' failed: No such file or directory

----------------------------------------
Command "c:\users\user1\appdata\local\programs\python\python37-32\python.exe -u -
c "import setuptools, tokenize;__file__='C:\\Users\\user1\\AppData\\Local\\Temp\\
pip-install-fgsrabne\\python-Levenshtein\\setup.py';f=getattr(tokenize, 'open',
open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record C:\Users\user1\AppData\Local\Temp\pip-recor
d-20u1vm40\install-record.txt --single-version-externally-managed --compile" fai
led with error code 1 in C:\Users\user1\AppData\Local\Temp\pip-install-fgsrabne\p
ython-Levenshtein\

最佳答案

也许为 anaconda 安装会有帮助:

pip install conda
conda install -c conda-forge python-levenshtein

关于python - 无法在 Windows 上安装 python-Levenshtein,错误代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51883206/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com