安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c

一、安装Paddle遇到ERROR: Command errored out with exit status 1:
安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c_第1张图片二、错误内容:

 ERROR: Command errored out with exit status 1:
     command: 'f:\python3.7\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-r6rqf3id\\python-levenshtein_572ba2d684844e8da173c059cf96014d\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-r6rqf3id\\python-levenshtein_572ba2d684844e8da173c059cf96014d\\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\ADMINI~1\AppData\Local\Temp\pip-record-zf7tpan2\install-record.txt' --single-version-externally-managed --compile --install-headers 'f:\python3.7\Include\python-Levenshtein'
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-r6rqf3id\python-levenshtein_572ba2d684844e8da173c059cf96014d\
    Complete output (27 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\Levenshtein
    copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
    copying Levenshtein\__init__.py -> build\lib.win-amd64-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 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.7\Levenshtein
    copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
    running build_ext
    building 'Levenshtein._levenshtein' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'f:\python3.7\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-r6rqf3id\\python-levenshtein_572ba2d684844e8da173c059cf96014d\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-r6rqf3id\\python-levenshtein_572ba2d684844e8da173c059cf96014d\\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\ADMINI~1\AppData\Local\Temp\pip-record-zf7tpan2\install-record.txt' --single-version-externally-managed --compile --install-headers 'f:\python3.7\Include\python-Levenshtein' Check the logs for full command output.

三、解决方法:

按照错误提示下载安装相应的库,在在https://www.lfd.uci.edu/~gohlke/pythonlibs/,已经给我们集成了这个包,可以跳过这库的安装。

四、运行环境:

Win 10;

Python3.7.4, 64位

安装Twisted包来进一步安装Scrapy。

  • 1.首先打开https://www.lfd.uci.edu/~gohlke/pythonlibs/,找到对应版本的Twisted并下载到你的文件夹。此例如下图所示Twisted‑…0‑cp37‑cp37m‑win_amd64.whl

注:这个网页加载很慢,有时候下载不成功,使用外网几秒钟就可以下载

每个人的python版本和电脑操作系统类型不一样,根据自己的需要找到合适的下载安装

  • 2.利用pip install命令安装指定存储路径下的whl文件。如图所示

安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c_第2张图片

C:\Users\Administrator>pip install F:\whle\Twisted-20.3.0-cp37-cp37m-win_amd64.whl

运行结果如图

安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c_第3张图片

  • 3.利用pip install 命令继续安装Scrapy,命令为
pip install Scrapy

运行成功图:
在这里插入图片描述

  • 4.还需要安装如下图

安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c_第4张图片

  • 5.命令行
C:\Users\Administrator>pip install F:\python3.7\wordcloud-1.8.1-cp37-cp37m-win_amd64.whl

运行成功即可

安装到python目录下
安装PaddleOCR遇到ERROR: Command errored out with exit status 1:command: ‘f:\python3.7\python.exe‘ -u -c_第5张图片
问题解决

你可能感兴趣的:(paddlepaddle,人工智能)