Ddddocr - 通用验证码识别OCR pypi版

Overview

header.png

带带弟弟OCR通用验证码识别SDK免费开源版

今天ddddocr又更新啦!

当前版本为1.3.1

想必很多做验证码的新手,一定头疼碰到点选类型的图像,做样本费时费力,神经网络不会写,训练设备太昂贵,模型效果又不好。

市场上常见的点选类验证码图片如下图所示

Test

Test

Test

Test

那么今天,他来了,ddddocr带着重磅更新大摇大摆的走来了。

简介

ddddocr是由sml2h3开发的专为验证码厂商进行对自家新版本验证码难易强度进行验证的一个python库,其由作者与kerlomz共同合作完成,通过大批量生成随机数据后进行深度网络训练,本身并非针对任何一家验证码厂商而制作,本库使用效果完全靠玄学,可能可以识别,可能不能识别。

ddddocr奉行着开箱即用、最简依赖的理念,尽量减少用户的配置和使用成本,希望给每一位测试者带来舒适的体验

项目地址: 点我传送

更新说明

本次更新其实分为两部分,其中有一部分是在1.2.0版本就已经更新了,但是在这里还是有必要提一下的。

第一部分 OCR识别部分

在1.2.0开始,ddddocr的识别部分进行了一次beta更新,主要更新在于网络结构主体的升级,其训练数据并没有发生过多的改变,所以理论上在识别结果上,原先可能识别效果的很好的图形在1.2.0上有一小部分概率会有一定程度的下降,也有可能原本识别不好的图形在1.2.0之后效果却变得特别好。 测试代码:

import ddddocr

ocr = ddddocr.DdddOcr()

with open("test.jpg", 'rb') as f:
    image = f.read()

res = ocr.classification(image)
print(res)

由于事实上确实在一些图片上老版本的模型识别效果比新模型好,特地这次更新把老模型也加入进去了,通过在初始化ddddocr的时候使用old参数即可快速切换老模型

import ddddocr

ocr = ddddocr.DdddOcr(old=True)

with open("test.jpg", 'rb') as f:
    image = f.read()

res = ocr.classification(image)
print(res)

OCR部分应该已经有很多人做了测试,在这里就放一部分网友的测试图片。

Test Test Test Test Test Test Test Test Test Test Test Test 等等更多图片等你测试哟~

第二部分 目标检测部分

在本次1.3.0的更新中,目标检测部分隆重登场! 目标检测部分同样也是由大量随机合成数据训练而成,对于现在已有的点选验证码图片或者未知的验证码图片都有可能具备一定的识别能力,适用于文字点选和图标点选。 简单来说,对于点选类的验证码,可以快速的检测出图片上的文字或者图标。

import ddddocr
import cv2

det = ddddocr.DdddOcr(det=True)

with open("test.jpg", 'rb') as f:
    image = f.read()

poses = det.detection(image)
print(poses)

im = cv2.imread("test.jpg")

for box in poses:
    x1, y1, x2, y2 = box
    im = cv2.rectangle(im, (x1, y1), (x2, y2), color=(0, 0, 255), thickness=2)

cv2.imwrite("result.jpg", im)

举些例子:

Test Test Test Test Test Test Test

以上只是目前我能找到的点选验证码图片,做了一个简单的测试。

安装

环境支持

python <= 3.9

Windows/Linux/Macos..

暂时不支持Macbook M1(X),M1(X)用户需要自己编译onnxruntime才可以使用

安装命令

pip install ddddocr

以上命令将自动安装符合自己电脑环境的最新ddddocr

交流群 (加我好友拉你进群)

Test

Comments
  • Win10 20H2 + Python3.9.5无法安装

    Win10 20H2 + Python3.9.5无法安装

    pip install ddddocr Collecting ddddocr Using cached ddddocr-1.0.6-py3-none-any.whl (6.9 MB) Using cached ddddocr-1.0.5-py3-none-any.whl (3.3 MB) Collecting torchvision Using cached torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) Collecting ddddocr Using cached ddddocr-1.0.4.tar.gz (3.3 MB) Requirement already satisfied: numpy in e:\program files\python\python39-32\lib\site-packages (from ddddocr) (1.20.3) ERROR: Cannot install ddddocr==1.0.4, ddddocr==1.0.5 and ddddocr==1.0.6 because these package versions have conflicting dependencies.

    The conflict is caused by: ddddocr 1.0.6 depends on onnxruntime ddddocr 1.0.5 depends on onnxruntime ddddocr 1.0.4 depends on torchvision==0.9.1

    To fix this you could try to:

    1. loosen the range of package versions you've specified
    2. remove package versions to allow pip attempt to solve the dependency conflict

    ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

    opened by voomy 12
  • ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)

    ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)

    pip无法安装ddddocr,换了好几个源,都提示这个 ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none) ERROR: No matching distribution found for onnxruntime

    opened by merlin02306 7
  • 解析每次都弹警告信息

    解析每次都弹警告信息

    2021-07-30 15:45:48.3226553 [W:onnxruntime:, execution_frame.cc:721 onnxruntime::ExecutionFrame::VerifyOutputSizes] Expected shape from model of {1,19} does not match actual shape of {1,20} for output output screenImg03

    opened by arvinyi 6
  • ddddocr.DdddOcr(ocr=True)在centos系统报Segmentation fault (core dumped)错误

    ddddocr.DdddOcr(ocr=True)在centos系统报Segmentation fault (core dumped)错误

    在centos系统中尝试安装了python3.8版本和3.9版本,只要是运行ddddocr.DdddOcr(ocr=True)代码就会报coredump错误(ocr为false不会),看了下报错行数是在”self.__ort_session = onnxruntime.InferenceSession(self.__graph_path, providers=self.__providers)“代码中,怀疑和onnxruntime有关,尝试安装了多个版本都不行(后面测试1.6.0一个比较老的版本没问题),onnxruntime升级到最新版后虽然没有cordump,但就是一直卡着不出结果。辛苦大佬们帮忙看看这个问题,看看是否遇到了类似的

    opened by 18463105800 3
  • 如何部署GPU版本

    如何部署GPU版本

    @sml2h3 您好,请问您部署过GPU版本吗?我将模型设置如下 self.ocr = ddddocr.DdddOcr(use_gpu=True, old=True) 在推理时会有如下报错 TypeError: load_model(): incompatible function arguments. The following argument types are supported: 1. (self: onnxruntime.capi.onnxruntime_pybind11_state.InferenceSession, arg0: List[str]) -> None Invoked with: <onnxruntime.capi.onnxruntime_pybind11_state.InferenceSession object at 0x7f3754e7dce0>, [('CUDAExecutionProvider', {'device_id': 0, 'arena_extend_strategy': 'kNextPowerOfTwo', 'cuda_mem_limit': 1073741824, 'cudnn_conv_algo_search': 'EXHAUSTIVE', 'do_copy_in_default_stream': True})] 您有什么解决办法吗? 感谢!

    opened by Wangbenzhi 3
  • classification() add image type Image.Image and pathlib.Path

    classification() add image type Image.Image and pathlib.Path

    classification()函数的图片参数新增两种类型:Image.Image 及 pathlib.Path 方便直接识别屏幕截图,直接内存以避免磁盘操作。 以及简化磁盘图片的识别加载过程。 用法示例一,屏幕坐标抓图直接识别:

    import ddddocr
    from PIL import ImageGrab
    vcode_ocr = ddddocr.DdddOcr()
    img_vcode = ImageGrab.grab((20, 60, 100, 100), all_screens=True)
    v = vcode_ocr.classification(img_vcode)
    print(v)
    
    

    输出

    96BA
    
    

    用法示例二,识别目录中全部图片:

    import ddddocr
    from pathlib import Path
    vcode_ocr = ddddocr.DdddOcr()
    for filename in Path('z:\\t').glob(r'**/*'):
        if not filename.suffix.lower() in ('.png','.jpg'):
            continue
        v = vcode_ocr.classification(filename)
        print(f'{v}\t{str(filename)}')
    
    

    输出

    2a3ny   z:\t\2a3ny.jpg
    6FKU    z:\t\6FKU.png
    5GNV    z:\t\5GNV.png
    
    
    opened by lededev 3
  • 安装报错?

    安装报错?

    使用命令 pip install ddddocr 安装时报错:

    ERROR: Could not find a version that satisfies the requirement onnxruntime (from ddddocr) (from versions: none)
    ERROR: No matching distribution found for onnxruntime
    

    怎么回事?

    Python版本:3.10.0

    opened by suyin-long 3
  • 请问何时支持Python 3.10版本 windows 64bit

    请问何时支持Python 3.10版本 windows 64bit

    Using cached ddddocr-1.0.6-py3-none-any.whl (6.9 MB) Requirement already satisfied: numpy in d:\python310\lib\site-packages (from ddddocr) (1.22.4) Requirement already satisfied: Pillow in d:\python310\lib\site-packages (from ddddocr) (9.1.1) ERROR: Ignored the following versions that require a different python version: 1.0.8 Requires-Python <3.8; 1.1.0 Requires-Python <3.9; 1.2.0 Requires-Python <3.10; 1.3.0 Requires-Python <3.10; 1.3.1 Requires-Python <3.10; 1.4.0 Requires-Python <3.10; 1.4.1 Requires-Python <3.10; 1.4.2 Requires-Python <3.10; 1.4.3 Requires-Python <3.10 ERROR: Could not find a version that satisfies the requirement onnxruntime (from ddddocr) (from versions: none) ERROR: No matching distribution found for onnxruntime

    python --version Python 3.10.4

    opened by blueicesir 2
  • 容器中报错(即使更换为opencv-python-headless也无法解决)

    容器中报错(即使更换为opencv-python-headless也无法解决)

    若使用opencv-python则“libGL.so.1: cannot open shared object file: No such file or directory” opencv-python-headless则 ”Traceback (most recent call last): File "main.py", line 1, in import ddddocr File "/home/runner/ocr/venv/lib/python3.8/site-packages/ddddocr/init.py", line 12, in import cv2 File "/home/runner/ocr/venv/lib/python3.8/site-packages/cv2/init.py", line 190, in bootstrap() File "/home/runner/ocr/venv/lib/python3.8/site-packages/cv2/init.py", line 120, in bootstrap load_first_config(['config.py'], True) File "/home/runner/ocr/venv/lib/python3.8/site-packages/cv2/init.py", line 118, in load_first_config raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames)) ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.“

    opened by Ecalose 2
  • 我有一个闪动的gif验证码,4个字符,可以识别出后3个,第1个被忽略了。

    我有一个闪动的gif验证码,4个字符,可以识别出后3个,第1个被忽略了。

    提供三个样本:

    3 2 4

    代码: `import ddddocr

    ocr = ddddocr.DdddOcr(old=True) with open('3.gif', 'rb') as f: img_bytes = f.read() res = ocr.classification(img_bytes)

    print(res)`

    opened by ageback 2
  • Error

    Error

    pip3 install ddddocr Collecting ddddocr Using cached ddddocr-1.0.6-py3-none-any.whl (6.9 MB) Collecting Pillow Using cached Pillow-9.0.1-cp310-cp310-macosx_10_10_universal2.whl (3.3 MB) ERROR: Could not find a version that satisfies the requirement onnxruntime (from ddddocr) (from versions: none) ERROR: No matching distribution found for onnxruntime

    Python 3.10.2

    不是M1 macOS BigSur 11.6.3 (20G415) MacBook Pro (Retina, 13-inch, Late 2013) Intel 也不支持?

    opened by androidcn 2
  • 项目名称包含下划线(_)时,恢复训练时提取 history_step 异常

    项目名称包含下划线(_)时,恢复训练时提取 history_step 异常

    /utils/train.py line: 58

    checkpoint_name = checkpoint.split(".")[0].split("_")
    if int(checkpoint_name[3]) > history_step:
        newer_checkpoint = checkpoint
        history_step = int(checkpoint_name[3])
    

    to

    checkpoint_name = checkpoint.split(".")[0].split("_")
    if int(checkpoint_name[-1]) > history_step:
        newer_checkpoint = checkpoint
        history_step = int(checkpoint_name[-1])
    
    opened by frankxzw 0
  • 容器中安装ddddocr 失败

    容器中安装ddddocr 失败

    是在docker 容器中安装的 看了一下似乎是卡在numpy1.19.3准备元数据的时候有问题,但是搜了好久没找到解决方法

    环境:

    Python 3.9.7 pip 22.3 from /usr/lib/python3.9/site-packages/pip (python 3.9)

    错误Code:

    root@filelist:/fl $ pip install ddddocr
    Collecting ddddocr
      Using cached ddddocr-1.4.7-py3-none-any.whl (75.9 MB)
    Collecting opencv-python-headless
      Downloading opencv-python-headless-4.6.0.66.tar.gz (90.3 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.3/90.3 MB 2.8 MB/s eta 0:00:00
      Installing build dependencies ... error
      error: subprocess-exited-with-error
      
      × pip subprocess to install build dependencies did not run successfully.
      │ exit code: 1
      ╰─> [267 lines of output]
          Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
          Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
          Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
          Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
          Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
          Ignoring numpy: markers 'python_version >= "3.10"' don't match your environment
          Collecting setuptools==59.2.0
            Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
          Collecting wheel==0.37.0
            Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
          Collecting cmake>=3.1
            Using cached cmake-3.24.2-py2.py3-none-musllinux_1_1_x86_64.whl (24.8 MB)
          Collecting pip
            Using cached pip-22.3-py3-none-any.whl (2.1 MB)
          Collecting scikit-build>=0.13.2
            Using cached scikit_build-0.16.2-py3-none-any.whl (78 kB)
          Collecting numpy==1.19.3
            Using cached numpy-1.19.3.zip (7.3 MB)
            Installing build dependencies: started
            Installing build dependencies: finished with status 'done'
            Getting requirements to build wheel: started
            Getting requirements to build wheel: finished with status 'done'
            Preparing metadata (pyproject.toml): started
            Preparing metadata (pyproject.toml): finished with status 'error'
            error: subprocess-exited-with-error
          
            × Preparing metadata (pyproject.toml) did not run successfully.
            │ exit code: 1
            ╰─> [228 lines of output]
                Running from numpy source directory.
                setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
                  run_build = parse_setuppy_commands()
                Processing numpy/random/_bounded_integers.pxd.in
                Processing numpy/random/bit_generator.pyx
                Processing numpy/random/mtrand.pyx
                Processing numpy/random/_sfc64.pyx
                Processing numpy/random/_generator.pyx
                Processing numpy/random/_common.pyx
                Processing numpy/random/_bounded_integers.pyx.in
                Processing numpy/random/_mt19937.pyx
                Processing numpy/random/_philox.pyx
                Processing numpy/random/_pcg64.pyx
                Cythonizing sources
                blas_opt_info:
                blas_mkl_info:
                customize UnixCCompiler
                  libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                blis_info:
                  libraries blis not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                openblas_info:
                  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                atlas_3_10_blas_threads_info:
                Setting PTATLAS=ATLAS
                  libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                atlas_3_10_blas_info:
                  libraries satlas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                atlas_blas_threads_info:
                Setting PTATLAS=ATLAS
                  libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                atlas_blas_info:
                  libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                accelerate_info:
                  NOT AVAILABLE
          
                /tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/system_info.py:1914: UserWarning:
                    Optimized (vendor) Blas libraries are not found.
                    Falls back to netlib Blas library which has worse performance.
                    A better performance should be easily gained by switching
                    Blas library.
                  if self._calc_info(blas):
                blas_info:
                  libraries blas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                /tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/system_info.py:1914: UserWarning:
                    Blas (http://www.netlib.org/blas/) libraries not found.
                    Directories to search for the libraries can be specified in the
                    numpy/distutils/site.cfg file (section [blas]) or by setting
                    the BLAS environment variable.
                  if self._calc_info(blas):
                blas_src_info:
                  NOT AVAILABLE
          
                /tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/system_info.py:1914: UserWarning:
                    Blas (http://www.netlib.org/blas/) sources not found.
                    Directories to search for the sources can be specified in the
                    numpy/distutils/site.cfg file (section [blas_src]) or by setting
                    the BLAS_SRC environment variable.
                  if self._calc_info(blas):
                  NOT AVAILABLE
          
                non-existing path in 'numpy/distutils': 'site.cfg'
                lapack_opt_info:
                lapack_mkl_info:
                  libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                openblas_lapack_info:
                  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                openblas_clapack_info:
                  libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                flame_info:
                  libraries flame not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                atlas_3_10_threads_info:
                Setting PTATLAS=ATLAS
                  libraries lapack_atlas not found in /usr/local/lib
                  libraries tatlas,tatlas not found in /usr/local/lib
                  libraries lapack_atlas not found in /usr/lib
                  libraries tatlas,tatlas not found in /usr/lib
                <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
                  NOT AVAILABLE
          
                atlas_3_10_info:
                  libraries lapack_atlas not found in /usr/local/lib
                  libraries satlas,satlas not found in /usr/local/lib
                  libraries lapack_atlas not found in /usr/lib
                  libraries satlas,satlas not found in /usr/lib
                <class 'numpy.distutils.system_info.atlas_3_10_info'>
                  NOT AVAILABLE
          
                atlas_threads_info:
                Setting PTATLAS=ATLAS
                  libraries lapack_atlas not found in /usr/local/lib
                  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
                  libraries lapack_atlas not found in /usr/lib
                  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
                <class 'numpy.distutils.system_info.atlas_threads_info'>
                  NOT AVAILABLE
          
                atlas_info:
                  libraries lapack_atlas not found in /usr/local/lib
                  libraries f77blas,cblas,atlas not found in /usr/local/lib
                  libraries lapack_atlas not found in /usr/lib
                  libraries f77blas,cblas,atlas not found in /usr/lib
                <class 'numpy.distutils.system_info.atlas_info'>
                  NOT AVAILABLE
          
                lapack_info:
                  libraries lapack not found in ['/usr/local/lib', '/usr/lib']
                  NOT AVAILABLE
          
                /tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/system_info.py:1748: UserWarning:
                    Lapack (http://www.netlib.org/lapack/) libraries not found.
                    Directories to search for the libraries can be specified in the
                    numpy/distutils/site.cfg file (section [lapack]) or by setting
                    the LAPACK environment variable.
                  return getattr(self, '_calc_info_{}'.format(name))()
                lapack_src_info:
                  NOT AVAILABLE
          
                /tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/system_info.py:1748: UserWarning:
                    Lapack (http://www.netlib.org/lapack/) sources not found.
                    Directories to search for the sources can be specified in the
                    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
                    the LAPACK_SRC environment variable.
                  return getattr(self, '_calc_info_{}'.format(name))()
                  NOT AVAILABLE
          
                numpy_linalg_lapack_lite:
                  FOUND:
                    language = c
                    define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
          
                /usr/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
                  warnings.warn(msg)
                running dist_info
                running build_src
                build_src
                building py_modules sources
                creating build
                creating build/src.linux-x86_64-3.9
                creating build/src.linux-x86_64-3.9/numpy
                creating build/src.linux-x86_64-3.9/numpy/distutils
                building library "npymath" sources
                Could not locate executable gfortran
                Could not locate executable f95
                Could not locate executable ifort
                Could not locate executable ifc
                Could not locate executable lf95
                Could not locate executable pgfortran
                Could not locate executable nvfortran
                Could not locate executable f90
                Could not locate executable f77
                Could not locate executable fort
                Could not locate executable efort
                Could not locate executable efc
                Could not locate executable g77
                Could not locate executable g95
                Could not locate executable pathf95
                Could not locate executable nagfor
                don't know how to compile Fortran code on platform 'posix'
                Traceback (most recent call last):
                  File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
                    main()
                  File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
                    json_out['return_val'] = hook(**hook_input['kwargs'])
                  File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
                    return hook(metadata_directory, config_settings)
                  File "/tmp/pip-build-env-2ej5_wn5/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
                    self.run_setup()
                  File "/tmp/pip-build-env-2ej5_wn5/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
                    super(_BuildMetaLegacyBackend,
                  File "/tmp/pip-build-env-2ej5_wn5/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
                    exec(compile(code, __file__, 'exec'), locals())
                  File "setup.py", line 508, in <module>
                    setup_package()
                  File "setup.py", line 500, in setup_package
                    setup(**metadata)
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/core.py", line 169, in setup
                    return old_setup(**new_attr)
                  File "/tmp/pip-build-env-2ej5_wn5/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
                    return distutils.core.setup(**attrs)
                  File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
                    dist.run_commands()
                  File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
                    self.run_command(cmd)
                  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
                    cmd_obj.run()
                  File "/tmp/pip-build-env-2ej5_wn5/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run
                    egg_info.run()
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/command/egg_info.py", line 24, in run
                    self.run_command("build_src")
                  File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
                    self.distribution.run_command(command)
                  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
                    cmd_obj.run()
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/command/build_src.py", line 144, in run
                    self.build_sources()
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/command/build_src.py", line 155, in build_sources
                    self.build_library_sources(*libname_info)
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/command/build_src.py", line 288, in build_library_sources
                    sources = self.generate_sources(sources, (lib_name, build_info))
                  File "/tmp/pip-install-ute7fssj/numpy_ec4df13e2eef477abd89f14813e85622/numpy/distutils/command/build_src.py", line 378, in generate_sources
                    source = func(extension, build_dir)
                  File "numpy/core/setup.py", line 663, in get_mathlib_info
                    raise RuntimeError("Broken toolchain: cannot link a simple C program")
                RuntimeError: Broken toolchain: cannot link a simple C program
                [end of output]
          
            note: This error originates from a subprocess, and is likely not a problem with pip.
          error: metadata-generation-failed
          
          × Encountered error while generating package metadata.
          ╰─> See above for output.
          
          note: This is an issue with the package mentioned above, not pip.
          hint: See above for details.
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: subprocess-exited-with-error
    
    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> See above for output.
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    
    opened by wubushanyan 0
  • 无法正常返回文字

    无法正常返回文字

    识别一张有文字的图片 返回这些东西

    2022-10-01 09:10:19.7087792 [W:onnxruntime:, execution_frame.cc:812 onnxruntime::ExecutionFrame::VerifyOutpu tSizes] Expected shape from model of {1,19} does not match actual shape of {1,7} for output output

    opened by tianxiu2b2t 0
Owner
Sml2h3
逆向工程师
Sml2h3