Ne pouvez pas installer de Levenshtein paquet sur Windows Python 3.5
J'ai besoin d'installer python Levenshtein paquet afin d'utiliser cette bibliothèque.
Malheureusement, je ne suis pas capable de l'installer avec succès. J'ai l'habitude d'installer des bibliothèques avec le pip. Cependant, cette fois, je suis error: [WinError 2] The system cannot find the file specified
qui ne m'était jamais arrivé avant (lors de l'installation de bibliothèques). J'ai essayé de l'installer à l'aide de la python setup.py install
mais j'ai exactement la même erreur. Cette sortie-je obtenir à partir de la console.
C:\Users\my_user\Anaconda3\Lib\site-packages\python-Levenshtein-0.10.2>python setup.py install
running install
running bdist_egg
running egg_info
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing entry points to python_Levenshtein.egg-info\entry_points.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
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 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'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
building 'Levenshtein' extension
error: [WinError 2] The system cannot find the file specified
D'autre part, c'est ce que je reçois lors de l'exécution de pip install
:
C:\Users\my_user\Anaconda3\Lib\site-packages\python-Levenshtein-0.10.2>pip install python-Levenshtein
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\my_user\anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg (from python-Levenshtein)
Building wheels for collected packages: python-Levenshtein
Running setup.py bdist_wheel for python-Levenshtein ... error
Complete output from command c:\users\my_user\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\my_user\\AppData\\Local\\Temp\\pip-build-99lnpr1w\\python-Levenshtein\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\my_user\AppData\Local\Temp\tmpvw371ebspip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.5\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.5\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 top-level names to python_Levenshtein.egg-info\top_level.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.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.win-amd64-3.5\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.5\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein
Running setup.py install for python-Levenshtein ... error
Complete output from command c:\users\my_user\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\my_user\\AppData\\Local\\Temp\\pip-build-99lnpr1w\\python-Levenshtein\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\my_user\AppData\Local\Temp\pip-wjhuwi7v-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.5\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.5\Levenshtein
running egg_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 python_Levenshtein.egg-info\PKG-INFO
writing requirements to python_Levenshtein.egg-info\requires.txt
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.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.win-amd64-3.5\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.5\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "c:\users\my_user\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\my_user\\AppData\\Local\\Temp\\pip-build-99lnpr1w\\python-Levenshtein\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\my_user\AppData\Local\Temp\pip-wjhuwi7v-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\my_user\AppData\Local\Temp\pip-build-99lnpr1w\python-Levenshtein\
Je suis avec Windows 10 avec Python 3.5. J'ai lu d'autres questions comme cette et cette mais j'ai trouvé que ce sont des problèmes différents. En passant, j'ai aussi essayé ce qui suit, le problème persiste.
- De course de la console en tant qu'Administrateur
- (Ré)installation VC++ 2008
Merci d'avance
- Long shot: avez-vous un compilateur C pour votre plate-forme installée? Ce package est la C-extension (implémenté en C, en Python interface inclus). Autres forfaits habituellement seulement de téléchargement *.py fichiers, ici vous devez compiler le code source.
- Comment puis-je le vérifier? Ne sais pas si les questions, mais je fais bon usage de beaucoup d'autres bibliothèques Python comme les Pandas, scikit-learn, BeautifulSoup sans problèmes. Merci de répondre!
Vous devez vous connecter pour publier un commentaire.
J'ai donc rencontré ce problème, je n'ai pas tout à fait la même erreur d'info que vous, mais c'est probablement parce que vous êtes en cours d'exécution anaconda et je suis un dieu empereur parmi les hommes.
Je l'ai collé ma sortie d'erreur ci-dessous, mais vous pouvez voir que les deux fois, il ne fonctionne pas pendant le processus de génération, dans mon code en bas il y a une référence manquante pour "rc.exe" qui est utilisée pour compiler des ressources à partir d'une liste de ressources.
Bien il s'avère que python-Levenshtein est à la recherche d'rc.exe dans le mauvais dossier. J'ai googlé autour et a trouvé cette réponse de stackoverflow, la solution était:
rc.exe
etrcdll.dll
deC:\Program Files (x86)\Windows Kits\8.1\bin\x86
~\Path\To\Microsoft Visual Studio 14.0\VC\bin\amd64_x86
cvtres.exe
de~\Path\To\Microsoft Visual Studio 14.0\VC\bin\
en~\Path\To\Microsoft Visual Studio 14.0\VC\bin\amd64_x86
~\Path\To\Microsoft Visual Studio 14.0\VC\bin\x86_amd64
parce que ces deux chemins sont très similaires.Maintenant, vous pouvez
pip install python-Levenshtein
et cela devrait fonctionner!Voici mes journaux de sortie:
Tandis que pas la résolution de votre problème directement, vous devriez être en mesure d'installer la bibliothèque à l'aide de l'excellent officieux binaire Windows dépôt ici:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-levenshtein
Télécharger le
.whl
fichier et l'installer en utilisant pip:pip install python_Levenshtein-0.12.0-cp35-none-win_amd64.whl
Comme pour l'erreur, je suis d'accord avec Rogalski. Vous avez probablement besoin d'un compilateur C installé (comme la version gratuite de Visual Studio Community Edition).
Edit: Désolé, je viens de remarquer que cela a déjà été suggéré dans un de vos liée à des questions ici: https://stackoverflow.com/a/29926192/6345502 - j'espère que cela aide quand même!
python_Levenshtein-0.12.0-cp35-none-win_amd64.whl
, lecp35
est pour python 3.5.Dans le cas où vous êtes à l'aide de l'Anaconda, essayez: