paddlehub的简单应用

1、下载安装

pip install paddlehub -i https://pypi.tuna.tsinghua.edu.cn/simple

报错:

Collecting onnx<=1.9.0 (from paddle2onnx>=0.5.1->paddlehub)Using cached https://pypi.tuna.tsinghua.edu.cn/packages/73/e9/5b953497c0e36df589fc60cc6c6b35a65eb67d9ad1e45a9163663e43426e/onnx-1.9.0.tar.gz (9.8 MB)Installing build dependencies ... doneGetting requirements to build wheel ... errorerror: subprocess-exited-with-error× Getting requirements to build wheel did not run successfully.│ exit code: 1╰─> [21 lines of output]fatal: not a git repository (or any of the parent directories): .gitTraceback (most recent call last):File "E:\software\python_env\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>main()File "E:\software\python_env\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in mainjson_out['return_val'] = hook(**hook_input['kwargs'])^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "E:\software\python_env\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheelreturn hook(config_settings)^^^^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-8xaz33be\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheelreturn self._get_build_requires(config_settings, requirements=['wheel'])^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-8xaz33be\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requiresself.run_setup()File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-8xaz33be\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setupsuper().run_setup(setup_script=setup_script)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-8xaz33be\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setupexec(code, locals())File "<string>", line 86, in <module>
note: This error originates from a subprocess, and is likely not a problem with pip.

看样子像是缺少Cmake

下载安装cmake尝试解决一下:

下载地址:

Index of /files/v3.29

安装 按需修改并下一步即可

安装完成后重新尝试下载又报错

Building wheels for collected packages: onnx, ffmpy, jieba, seqevalBuilding wheel for onnx (pyproject.toml) ... errorerror: subprocess-exited-with-error× Building wheel for onnx (pyproject.toml) did not run successfully.│ exit code: 1╰─> [128 lines of output]fatal: not a git repository (or any of the parent directories): .gitC:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\dist.py:476: SetuptoolsDeprecationWarning: Invalid dash-separated options!!********************************************************************************Usage of dash-separated 'license-file' will not be supported in futureversions. Please use the underscore name 'license_file' instead.By 2024-Sep-26, you need to update your project and remove deprecated callsor your builds will no longer be supported.See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.********************************************************************************!!opt = self.warn_dash_deprecation(opt, section)running bdist_wheelrunning buildrunning build_pyrunning create_versionrunning cmake_buildUsing cmake args: ['E:\\Cmake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=E:\\python3.12\\include', '-DPYTHON_EXECUTABLE=E:\\python3.12\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp312-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.12', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\GW00227659\\AppData\\Local\\Temp\\pip-install-p8lc4nvf\\onnx_839c8e8f20ee47c98bd84c37098fe5f3']-- Building for: Visual Studio 17 2022CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):Compatibility with CMake < 3.5 will be removed from a future version ofCMake.Update the VERSION argument <min> value or use a ...<max> suffix to tellCMake that the project does not need compatibility with older versions.-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.-- The C compiler identification is MSVC 19.39.33523.0-- The CXX compiler identification is MSVC 19.39.33523.0-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working C compiler: D:/C++BuildTools/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped-- Detecting C compile features-- Detecting C compile features - done-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Check for working CXX compiler: D:/C++BuildTools/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped-- Detecting CXX compile features-- Detecting CXX compile features - doneCMake Warning (dev) at CMakeLists.txt:114 (find_package):Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modulesare removed.  Run "cmake --help-policy CMP0148" for policy details.  Usethe cmake_policy command to set the policy and suppress this warning.This warning is for project developers.  Use -Wno-dev to suppress it.-- Found PythonInterp: E:/python3.12/python.exe (found suitable version "3.12.2", minimum required is "3.12")CMake Warning (dev) at CMakeLists.txt:115 (find_package):Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modulesare removed.  Run "cmake --help-policy CMP0148" for policy details.  Usethe cmake_policy command to set the policy and suppress this warning.This warning is for project developers.  Use -Wno-dev to suppress it.-- Found PythonLibs: E:/python3.12/libs/python312.lib (found suitable version "3.12.2", minimum required is "3.12")Generated: C:/Users/GW00227659/AppData/Local/Temp/pip-install-p8lc4nvf/onnx_839c8e8f20ee47c98bd84c37098fe5f3/.setuptools-cmake-build/onnx/onnx-ml.protoCMake Error at CMakeLists.txt:292 (message):Protobuf compiler not foundCall Stack (most recent call first):CMakeLists.txt:323 (relative_protobuf_generate_cpp)-- Configuring incomplete, errors occurred!Traceback (most recent call last):File "E:\python3.12\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>main()File "E:\python3.12\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in mainjson_out['return_val'] = hook(**hook_input['kwargs'])^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "E:\python3.12\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheelreturn _build_backend().build_wheel(wheel_directory, config_settings,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheelreturn self._build_with_temp_dir(^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dirself.run_setup()File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setupsuper().run_setup(setup_script=setup_script)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setupexec(code, locals())File "<string>", line 337, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\__init__.py", line 104, in setupreturn distutils.core.setup(**attrs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setupreturn run_commands(dist)^^^^^^^^^^^^^^^^^^File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commandsdist.run_commands()File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commandsself.run_command(cmd)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\dist.py", line 967, in run_commandsuper().run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_commandcmd_obj.run()File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in runself.run_command("build")File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_commandself.distribution.run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\dist.py", line 967, in run_commandsuper().run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_commandcmd_obj.run()File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in runself.run_command(cmd_name)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_commandself.distribution.run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\dist.py", line 967, in run_commandsuper().run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_commandcmd_obj.run()File "<string>", line 233, in runFile "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_commandself.distribution.run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\dist.py", line 967, in run_commandsuper().run_command(command)File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_commandcmd_obj.run()File "<string>", line 219, in runFile "E:\python3.12\Lib\subprocess.py", line 413, in check_callraise CalledProcessError(retcode, cmd)subprocess.CalledProcessError: Command '['E:\\Cmake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=E:\\python3.12\\include', '-DPYTHON_EXECUTABLE=E:\\python3.12\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp312-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.12', '-DONNX_USE_MSVC_STATIC_RUNTIME=ON', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\GW00227659\\AppData\\Local\\Temp\\pip-install-p8lc4nvf\\onnx_839c8e8f20ee47c98bd84c37098fe5f3']' returned non-zero exit status 1.[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for onnxBuilding wheel for ffmpy (pyproject.toml) ... doneCreated wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5607 sha256=7f5100e5417f0e937537a8a31a1ec96fed2b914e5ccaee15044851db5c0adf07Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\08\c5\8a\310ab3add33cd0284165ab43f11f77104184473544fdf4efd3Building wheel for jieba (pyproject.toml) ... doneCreated wheel for jieba: filename=jieba-0.42.1-py3-none-any.whl size=19314474 sha256=982d656865bf5e3af1e16e3f028da8f818e1c455a4ccfd61f72639ea2cd15c83Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\7b\3a\3e\1bf625b8dd63d53265aad527b244647c679dff9b60588a324fBuilding wheel for seqeval (pyproject.toml) ... doneCreated wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16186 sha256=a01810a8d4efcbb8769e6237e10ed26851e8c14452c253a1cc6add951db7f304Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\87\ae\4e\f12172105b270473557d0ff3889c45972a4c0f25d5905e1d4e
Successfully built ffmpy jieba seqeval
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects

尝试解决:

  1. Poetry:Poetry 是一个用于管理基于 pyproject.toml 的 Python 项目的工具。可以使用 pip 安装 Poetry:

  2. pip install poetry
    

重新下载依然是相同的报错 

尝试解决:

手动安装onnx :pip install onnx

 依然失败 ~~~~ 不知道报错的原因 盲目解决不掉啊

然后我重启了pycharm,在pycharm环境中下载成功了(为啥会重启呢,是因为我尝试在pycharm再次下载时,依然报错没有cmake,我猜测环境变量没有重新加载,因为此时我已经安装过cmake)

成功下载:

pip install paddlehub -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: paddlehub in e:\software\python_env\lib\site-packages (2.0.0)
Requirement already satisfied: colorama in e:\software\python_env\lib\site-packages (from paddlehub) (0.4.6)
Requirement already satisfied: colorlog in e:\software\python_env\lib\site-packages (from paddlehub) (6.8.2)
Requirement already satisfied: easydict in e:\software\python_env\lib\site-packages (from paddlehub) (1.13)
Requirement already satisfied: filelock in e:\software\python_env\lib\site-packages (from paddlehub) (3.13.1)
Requirement already satisfied: flask>=1.1.0 in e:\software\python_env\lib\site-packages (from paddlehub) (3.0.2)
Requirement already satisfied: gitpython in e:\software\python_env\lib\site-packages (from paddlehub) (3.1.37)
Requirement already satisfied: numpy in e:\python3.12\lib\site-packages (from paddlehub) (1.26.4)
Requirement already satisfied: matplotlib in e:\software\python_env\lib\site-packages (from paddlehub) (3.8.3)
Requirement already satisfied: opencv-python in e:\software\python_env\lib\site-packages (from paddlehub) (4.9.0.80)
Requirement already satisfied: packaging in e:\software\python_env\lib\site-packages (from paddlehub) (23.2)
Requirement already satisfied: Pillow in e:\python3.12\lib\site-packages (from paddlehub) (10.2.0)
Requirement already satisfied: pyyaml in e:\software\python_env\lib\site-packages (from paddlehub) (6.0.1)
Requirement already satisfied: pyzmq in e:\software\python_env\lib\site-packages (from paddlehub) (25.1.2)
Requirement already satisfied: rarfile in e:\software\python_env\lib\site-packages (from paddlehub) (4.2)
Requirement already satisfied: tqdm in e:\software\python_env\lib\site-packages (from paddlehub) (4.66.2)
Requirement already satisfied: visualdl>=2.0.0 in e:\software\python_env\lib\site-packages (from paddlehub) (2.5.3)
Requirement already satisfied: paddlenlp>=2.0.0b2 in e:\software\python_env\lib\site-packages (from paddlehub) (2.6.1)
Requirement already satisfied: Werkzeug>=3.0.0 in e:\software\python_env\lib\site-packages (from flask>=1.1.0->paddlehub) (3.0.1)
Requirement already satisfied: Jinja2>=3.1.2 in e:\software\python_env\lib\site-packages (from flask>=1.1.0->paddlehub) (3.1.3)
Requirement already satisfied: itsdangerous>=2.1.2 in e:\software\python_env\lib\site-packages (from flask>=1.1.0->paddlehub) (2.1.2)
Requirement already satisfied: click>=8.1.3 in e:\python3.12\lib\site-packages (from flask>=1.1.0->paddlehub) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in e:\software\python_env\lib\site-packages (from flask>=1.1.0->paddlehub) (1.7.0)
Requirement already satisfied: jieba in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.42.1)
Requirement already satisfied: seqeval in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (1.2.2)
Requirement already satisfied: dill<0.3.5 in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.3.4)
Requirement already satisfied: multiprocess<=0.70.12.2 in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.70.12.2)
Requirement already satisfied: datasets>=2.0.0 in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (2.17.1)
Requirement already satisfied: paddlefsl in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (1.1.0)
Requirement already satisfied: sentencepiece in e:\python3.12\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.2.0)
Requirement already satisfied: huggingface-hub>=0.11.1 in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.20.3)
Requirement already satisfied: onnx>=1.10.0 in e:\python3.12\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (1.16.0)
Requirement already satisfied: protobuf==3.20.2 in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (3.20.2)
Requirement already satisfied: paddle2onnx in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.8.1)
Requirement already satisfied: Flask-Babel in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (4.0.0)
Requirement already satisfied: fastapi in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.103.2)
Requirement already satisfied: uvicorn in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.29.0)
Requirement already satisfied: typer in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.12.3)
Requirement already satisfied: rich in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (13.7.1)
Requirement already satisfied: safetensors in e:\software\python_env\lib\site-packages (from paddlenlp>=2.0.0b2->paddlehub) (0.4.2)
Requirement already satisfied: bce-python-sdk in e:\software\python_env\lib\site-packages (from visualdl>=2.0.0->paddlehub) (0.9.7)
Requirement already satisfied: requests in e:\python3.12\lib\site-packages (from visualdl>=2.0.0->paddlehub) (2.31.0)
Requirement already satisfied: six>=1.14.0 in e:\python3.12\lib\site-packages (from visualdl>=2.0.0->paddlehub) (1.16.0)
Requirement already satisfied: pandas in e:\python3.12\lib\site-packages (from visualdl>=2.0.0->paddlehub) (2.2.1)
Requirement already satisfied: psutil in e:\software\python_env\lib\site-packages (from visualdl>=2.0.0->paddlehub) (5.9.8)
Requirement already satisfied: gitdb<5,>=4.0.1 in e:\software\python_env\lib\site-packages (from gitpython->paddlehub) (4.0.10)
Requirement already satisfied: contourpy>=1.0.1 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (1.2.0)
Requirement already satisfied: cycler>=0.10 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (4.42.1)
Requirement already satisfied: kiwisolver>=1.3.1 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in e:\software\python_env\lib\site-packages (from matplotlib->paddlehub) (2.8.2)
Requirement already satisfied: pyarrow>=12.0.0 in e:\software\python_env\lib\site-packages (from datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (15.0.0)
Requirement already satisfied: pyarrow-hotfix in e:\software\python_env\lib\site-packages (from datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (0.6)
Requirement already satisfied: xxhash in e:\software\python_env\lib\site-packages (from datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (3.4.1)
Requirement already satisfied: fsspec<=2023.10.0,>=2023.1.0 in e:\software\python_env\lib\site-packages (from fsspec[http]<=2023.10.0,>=2023.1.0->datasets>=2.0.0->paddlenlp>=2.0.0b2->
paddlehub) (2023.10.0)
Requirement already satisfied: aiohttp in e:\software\python_env\lib\site-packages (from datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (3.9.3)
Requirement already satisfied: Babel>=2.12 in e:\software\python_env\lib\site-packages (from Flask-Babel->paddlenlp>=2.0.0b2->paddlehub) (2.12.1)
Requirement already satisfied: pytz>=2022.7 in e:\python3.12\lib\site-packages (from Flask-Babel->paddlenlp>=2.0.0b2->paddlehub) (2024.1)
Requirement already satisfied: smmap<6,>=3.0.1 in e:\software\python_env\lib\site-packages (from gitdb<5,>=4.0.1->gitpython->paddlehub) (5.0.1)
Requirement already satisfied: typing-extensions>=3.7.4.3 in e:\python3.12\lib\site-packages (from huggingface-hub>=0.11.1->paddlenlp>=2.0.0b2->paddlehub) (4.10.0)
Requirement already satisfied: MarkupSafe>=2.0 in e:\software\python_env\lib\site-packages (from Jinja2>=3.1.2->flask>=1.1.0->paddlehub) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in e:\software\python_env\lib\site-packages (from requests->visualdl>=2.0.0->paddlehub) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in e:\software\python_env\lib\site-packages (from requests->visualdl>=2.0.0->paddlehub) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in e:\software\python_env\lib\site-packages (from requests->visualdl>=2.0.0->paddlehub) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in e:\software\python_env\lib\site-packages (from requests->visualdl>=2.0.0->paddlehub) (2024.2.2)
Requirement already satisfied: pycryptodome>=3.8.0 in e:\python3.12\lib\site-packages (from bce-python-sdk->visualdl>=2.0.0->paddlehub) (3.20.0)
Requirement already satisfied: future>=0.6.0 in e:\software\python_env\lib\site-packages (from bce-python-sdk->visualdl>=2.0.0->paddlehub) (1.0.0)
Requirement already satisfied: anyio<4.0.0,>=3.7.1 in e:\software\python_env\lib\site-packages (from fastapi->paddlenlp>=2.0.0b2->paddlehub) (3.7.1)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4 in e:\software\python_env\lib\site-packages (from fastapi->paddlenlp>=2.0.0b2->paddlehub) (
2.6.2)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in e:\software\python_env\lib\site-packages (from fastapi->paddlenlp>=2.0.0b2->paddlehub) (0.27.0)
Requirement already satisfied: tzdata>=2022.7 in e:\python3.12\lib\site-packages (from pandas->visualdl>=2.0.0->paddlehub) (2024.1)
Requirement already satisfied: markdown-it-py>=2.2.0 in e:\software\python_env\lib\site-packages (from rich->paddlenlp>=2.0.0b2->paddlehub) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in e:\software\python_env\lib\site-packages (from rich->paddlenlp>=2.0.0b2->paddlehub) (2.17.2)
Requirement already satisfied: scikit-learn>=0.21.3 in e:\software\python_env\lib\site-packages (from seqeval->paddlenlp>=2.0.0b2->paddlehub) (1.4.1.post1)
Requirement already satisfied: shellingham>=1.3.0 in e:\python3.12\lib\site-packages (from typer->paddlenlp>=2.0.0b2->paddlehub) (1.5.4)
Requirement already satisfied: h11>=0.8 in e:\python3.12\lib\site-packages (from uvicorn->paddlenlp>=2.0.0b2->paddlehub) (0.14.0)
Requirement already satisfied: sniffio>=1.1 in e:\software\python_env\lib\site-packages (from anyio<4.0.0,>=3.7.1->fastapi->paddlenlp>=2.0.0b2->paddlehub) (1.3.1)
Requirement already satisfied: aiosignal>=1.1.2 in e:\software\python_env\lib\site-packages (from aiohttp->datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in e:\software\python_env\lib\site-packages (from aiohttp->datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (23.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in e:\software\python_env\lib\site-packages (from aiohttp->datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (1.4.1)
Requirement already satisfied: multidict<7.0,>=4.5 in e:\software\python_env\lib\site-packages (from aiohttp->datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (6.0.5)
Requirement already satisfied: yarl<2.0,>=1.0 in e:\software\python_env\lib\site-packages (from aiohttp->datasets>=2.0.0->paddlenlp>=2.0.0b2->paddlehub) (1.9.4)
Requirement already satisfied: mdurl~=0.1 in e:\software\python_env\lib\site-packages (from markdown-it-py>=2.2.0->rich->paddlenlp>=2.0.0b2->paddlehub) (0.1.2)
Requirement already satisfied: annotated-types>=0.4.0 in e:\software\python_env\lib\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi->paddlenl
p>=2.0.0b2->paddlehub) (0.6.0)
Requirement already satisfied: pydantic-core==2.16.3 in e:\software\python_env\lib\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi->paddlenlp
>=2.0.0b2->paddlehub) (2.16.3)
Requirement already satisfied: scipy>=1.6.0 in e:\software\python_env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->paddlenlp>=2.0.0b2->paddlehub) (1.12.0)
Requirement already satisfied: joblib>=1.2.0 in e:\software\python_env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->paddlenlp>=2.0.0b2->paddlehub) (1.3.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in e:\software\python_env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->paddlenlp>=2.0.0b2->paddlehub) (3.3.0)

可以愉快的玩耍了

2、、小样例

  • $ hub install chinese_ocr_db_crnn_mobile
 hub install chinese_ocr_db_crnn_mobile
Traceback (most recent call last):File "<frozen runpy>", line 198, in _run_module_as_mainFile "<frozen runpy>", line 88, in _run_codeFile "E:\software\python_env\Scripts\hub.exe\__main__.py", line 4, in <module>File "E:\software\python_env\Lib\site-packages\paddlehub\__init__.py", line 28, in <module>from paddlehub.utils.paddlex import download, ResourceNotFoundErrorFile "E:\software\python_env\Lib\site-packages\paddlehub\utils\paddlex.py", line 19, in <module>from paddlehub.server.server import module_serverFile "E:\software\python_env\Lib\site-packages\paddlehub\server\__init__.py", line 17, in <module>from paddlehub.server.git_source import GitSourceFile "E:\software\python_env\Lib\site-packages\paddlehub\server\git_source.py", line 30, in <module>from paddlehub.module.module import RunModuleFile "E:\software\python_env\Lib\site-packages\paddlehub\module\__init__.py", line 16, in <module>from .module import ModuleFile "E:\software\python_env\Lib\site-packages\paddlehub\module\module.py", line 29, in <module>from paddlehub.compat import paddle_utilsFile "E:\software\python_env\Lib\site-packages\paddlehub\compat\paddle_utils.py", line 25, in <module>paddle.fluid.core.VarDesc.VarType.FP32: "float32",^^^^^^^^^^^^
AttributeError: module 'paddle' has no attribute 'fluid'. Did you mean: 'flip'?

 又报错 不是吧~~~

AttributeError: module 'paddle' has no attribute 'fluid'. Did you mean: 'flip'?

PS E:\software\pythonProject1> pip install paddle.fluid
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement paddle.fluid (from versions: none)
ERROR: No matching distribution found for paddle.fluid
PS E:\software\pythonProject1> pip install paddle      
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleDownloading https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 579.0/579.0 kB 4.0 MB/s eta 0:00:00Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-install-9lp003hl\paddle_de3deb8a5f1449c3930cfd98c6ade434\setup.py", line 3, in <module>import paddleFile "C:\Users\GW00227659\AppData\Local\Temp\pip-install-9lp003hl\paddle_de3deb8a5f1449c3930cfd98c6ade434\paddle\__init__.py", line 5, in <module>import common, dual, tight, data, proxModuleNotFoundError: No module named 'common'[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.
PS E:\software\pythonProject1> pip install common 
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting commonDownloading https://mirrors.aliyun.com/pypi/packages/eb/b2/c900168d36abd28b1b08a81387835eff8b574bc6c2e9fefb5c4a38135d94/common-0.1.2.tar.gz (3.5 kB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: commonBuilding wheel for common (setup.py) ... doneCreated wheel for common: filename=common-0.1.2-py3-none-any.whl size=3714 sha256=dd74b4ae5527e4351bc829dac46bf165d9db59a1a3481f906ff0891305ab8070Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\d5\ee\37\75318ea32c2e94b47bfcb6f985fd80ce7cc5751c382bf79bf0
Successfully built common
Installing collected packages: common
Successfully installed common-0.1.2
PS E:\software\pythonProject1> pip install paddle 
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleUsing cached https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-install-hlfu69fx\paddle_e60afdbbddd74dbfa512d73bf28ca3e9\setup.py", line 3, in <module>import paddleFile "C:\Users\GW00227659\AppData\Local\Temp\pip-install-hlfu69fx\paddle_e60afdbbddd74dbfa512d73bf28ca3e9\paddle\__init__.py", line 5, in <module>import common, dual, tight, data, proxModuleNotFoundError: No module named 'dual'[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.
PS E:\software\pythonProject1> pip install dual  
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting dualDownloading https://mirrors.aliyun.com/pypi/packages/b3/76/f0d25b1b461dc0f044eda154e18266c0d676f077fc3ecf7d4c08f88c8952/dual-0.1.0-py3-none-any.whl (6.9 kB)
Installing collected packages: dual
Successfully installed dual-0.1.0
PS E:\software\pythonProject1> pip install paddle
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleUsing cached https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-install-a9v2bbg0\paddle_94564764cba3428695bf91932ebfe5c6\setup.py", line 3, in <module>import paddleFile "C:\Users\GW00227659\AppData\Local\Temp\pip-install-a9v2bbg0\paddle_94564764cba3428695bf91932ebfe5c6\paddle\__init__.py", line 5, in <module>import common, dual, tight, data, proxModuleNotFoundError: No module named 'tight'[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.
PS E:\software\pythonProject1> pip install tight 
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting tightDownloading https://mirrors.aliyun.com/pypi/packages/7d/2b/a03125502d8d5cbccd26c6e88ec056f23e6aa3012b2823cc950476f48722/tight-0.1.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: PyYAML in e:\software\python_env\lib\site-packages (from tight) (6.0.1)
Collecting boto3 (from tight)Downloading https://mirrors.aliyun.com/pypi/packages/8f/73/a697d4cae44f5358c457b5de3ba1cf1374778a87bbd49a43e39be79b7249/boto3-1.34.93-py3-none-any.whl (139 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.3/139.3 kB 4.2 MB/s eta 0:00:00
Collecting flywheel>=0.5.1 (from tight)Downloading https://mirrors.aliyun.com/pypi/packages/77/fb/fd1252e62cc812da35d9a513b9a620acfac587c8571d0067f2f1d4aad783/flywheel-0.5.4-py2.py3-none-any.whl (33 kB)
Collecting dynamo3<1.0,>=0.4.9 (from flywheel>=0.5.1->tight)Downloading https://mirrors.aliyun.com/pypi/packages/c9/e5/cb76413fcf0205767eb9751fd111406c4d444a348a4504b52556489d3ebe/dynamo3-0.4.10-py2.py3-none-any.whl (34 kB)
Requirement already satisfied: six in e:\python3.12\lib\site-packages (from flywheel>=0.5.1->tight) (1.16.0)
Collecting botocore<1.35.0,>=1.34.93 (from boto3->tight)Downloading https://mirrors.aliyun.com/pypi/packages/eb/c3/c47c39c4c85691fc10ae16e1647c1d853d54f8fcd95f28362dc0d7472029/botocore-1.34.93-py3-none-any.whl (12.2 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 3.7 MB/s eta 0:00:00
Collecting jmespath<2.0.0,>=0.7.1 (from boto3->tight)Downloading https://mirrors.aliyun.com/pypi/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl (20 kB)
Collecting s3transfer<0.11.0,>=0.10.0 (from boto3->tight)Downloading https://mirrors.aliyun.com/pypi/packages/83/37/395cdb6ee92925fa211e55d8f07b9f93cf93f60d7d4ce5e66fd73f1ea986/s3transfer-0.10.1-py3-none-any.whl (82 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.2/82.2 kB 4.5 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in e:\software\python_env\lib\site-packages (from botocore<1.35.0,>=1.34.93->boto3->tight) (2.8.2)
Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in e:\software\python_env\lib\site-packages (from botocore<1.35.0,>=1.34.93->boto3->tight) (2.2.1)
Installing collected packages: jmespath, botocore, s3transfer, dynamo3, flywheel, boto3, tight
Successfully installed boto3-1.34.93 botocore-1.34.93 dynamo3-0.4.10 flywheel-0.5.4 jmespath-1.0.1 s3transfer-0.10.1 tight-0.1.0
PS E:\software\pythonProject1> pip install paddle
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleUsing cached https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-install-7777j2t6\paddle_877e0a763428465894621df32f89c743\setup.py", line 3, in <module>import paddleFile "C:\Users\GW00227659\AppData\Local\Temp\pip-install-7777j2t6\paddle_877e0a763428465894621df32f89c743\paddle\__init__.py", line 5, in <module>import common, dual, tight, data, proxModuleNotFoundError: No module named 'data'[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.
PS E:\software\pythonProject1> pip install data  
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting dataDownloading https://mirrors.aliyun.com/pypi/packages/ed/e9/623be82fac4250fc614741f5b1ead83d339794f94b19ac8665b6ea12ee05/data-0.4.tar.gz (7.0 kB)Preparing metadata (setup.py) ... done
Requirement already satisfied: six in e:\python3.12\lib\site-packages (from data) (1.16.0)
Requirement already satisfied: decorator in e:\software\python_env\lib\site-packages (from data) (5.1.1)
Collecting funcsigs (from data)Downloading https://mirrors.aliyun.com/pypi/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl (17 kB)
Building wheels for collected packages: dataBuilding wheel for data (setup.py) ... doneCreated wheel for data: filename=data-0.4-py3-none-any.whl size=7259 sha256=e650488bac182751859430ce951632691b9a962baa57d8056d1f05f6ebaa3f41Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\7d\70\ad\433041a98052b81068916cfec9730d7b88309576a8a7173f3c
Successfully built data
Installing collected packages: funcsigs, data
Successfully installed data-0.4 funcsigs-1.0.2
PS E:\software\pythonProject1> pip install paddle
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleUsing cached https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [8 lines of output]Traceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\GW00227659\AppData\Local\Temp\pip-install-5_3613l4\paddle_b859e50cc0d643559d72ed0625bf949b\setup.py", line 3, in <module>import paddleFile "C:\Users\GW00227659\AppData\Local\Temp\pip-install-5_3613l4\paddle_b859e50cc0d643559d72ed0625bf949b\paddle\__init__.py", line 5, in <module>import common, dual, tight, data, proxModuleNotFoundError: No module named 'prox'[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.
PS E:\software\pythonProject1> pip install prox  
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting proxDownloading https://mirrors.aliyun.com/pypi/packages/54/2e/9a755b5b16df7ad7ab5b801b034fcba10be8045beeef1d2c745859a5d9f2/prox-0.0.17.tar.gz (1.3 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 6.2 MB/s eta 0:00:00Preparing metadata (setup.py) ... done
Requirement already satisfied: urllib3>=1.18.1 in e:\software\python_env\lib\site-packages (from prox) (2.2.1)
Requirement already satisfied: pysocks in e:\software\python_env\lib\site-packages (from prox) (1.7.1)
Requirement already satisfied: peewee in e:\software\python_env\lib\site-packages (from prox) (3.17.1)
Collecting bottle (from prox)Downloading https://mirrors.aliyun.com/pypi/packages/bb/1f/5977ea88c6a3df6199db97d320e5da816d415d1eb75a987a1f6823d5cc9d/bottle-0.12.25-py3-none-any.whl (90 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.2/90.2 kB 5.0 MB/s eta 0:00:00
Requirement already satisfied: pyyaml in e:\software\python_env\lib\site-packages (from prox) (6.0.1)
Collecting python-geoip-python3 (from prox)Downloading https://mirrors.aliyun.com/pypi/packages/26/a3/026e23d8545d0f41571cd1d64d77ab9ff5056ded5bd597c562689183c75d/python_geoip_python3-1.3-py2.py3-none-any.whl (7.4 kB)
Requirement already satisfied: six in e:\python3.12\lib\site-packages (from prox) (1.16.0)
Building wheels for collected packages: proxBuilding wheel for prox (setup.py) ... doneCreated wheel for prox: filename=prox-0.0.17-py3-none-any.whl size=1280822 sha256=01b00305943e1a1773d44585b6f9b827bbe9d60ba5d12e51604fc003ffe5e17aStored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\f2\a2\09\acd75743fabe191890b2401a46df04b4b2601b922d8b1b2d16
Successfully built prox
Installing collected packages: python-geoip-python3, bottle, prox
Successfully installed bottle-0.12.25 prox-0.0.17 python-geoip-python3-1.3
PS E:\software\pythonProject1> pip install paddle
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting paddleUsing cached https://mirrors.aliyun.com/pypi/packages/55/cf/e4b6b9a54d2f072e4491e34317bf5f5fea260da8a3072e641832dc9ce770/paddle-1.0.2.tar.gz (579 kB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: paddleBuilding wheel for paddle (setup.py) ... doneCreated wheel for paddle: filename=paddle-1.0.2-py3-none-any.whl size=33377 sha256=9d651f544ae0d2b3811fbba68e4b4238a0f0585bd7f6e94b30fe2570ecfa0ab3Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\60\d1\b1\90953641182b2a91c2bd2a60c5138f6eba56ee1038e2263eaf
Successfully built paddle
Installing collected packages: paddle
Successfully installed paddle-1.0.2

补充下载依赖

pip install common 
pip install dual  

pip install tight 

pip install data   

pip install prox 

pip install paddle
 

再次执行:

import paddlehub as hub# 加载移动端预训练模型
ocr = hub.Module(name="chinese_ocr_db_crnn_mobile")
# 服务端可以加载大模型,效果更好
# ocr = hub.Module(name="chinese_ocr_db_crnn_server")# cls = ocr.load("D:\\工作内容\\AAA-重要资料\\2024年\\项目-大模型语言\\data")
cls = ocr.init_with_directory("D:\\工作内容\\AAA-重要资料\\2024年\\项目-大模型语言\\data")print(cls)

Traceback (most recent call last):
  File "E:\software\pythonProject1\paddle\paddlehub_demo.py", line 1, in <module>
    import paddlehub as hub
  File "E:\software\python_env\Lib\site-packages\paddlehub\__init__.py", line 22, in <module>
    raise RuntimeError(
RuntimeError: Version mismatch in PaddleHub and PaddlePaddle, you need to upgrade PaddlePaddle to version 2.0.0 or above.

 PaddleHub and PaddlePaddle 版本不匹配

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/317307.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[1688]jsp工资投放管理系统Myeclipse开发mysql数据库web结构java编程计算机网页项目

一、源码特点 JSP 工资投放管理系统是一套完善的java web信息管理系统&#xff0c;对理解JSP java编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。开发环境为 TOMCAT7.0,Myeclipse8.5开发&#xff0c;数据库为Mysql5.0…

TDengine写入2000万数据查询体验

最近在寻找时序数据库&#xff0c;想应用在公司的项目上。 上一篇文章实验了InfluxDB:windows上使用influx2.7学习,还学习了flux语言&#xff0c;最后发现宽表查询比较困难&#xff0c;就放弃了&#xff0c;于是决定试试国产时序数据库TDengine 参考 官方文档&#xff1a;htt…

Vitis HLS 学习笔记--IDE软件高效操作指引

目录 1. 简介 2. 实用软件操作 2.1 C/RTL Cosimulation 选项 2.2 Do not show this dialog again 2.3 New Solution 2.4 对比 Solution 2.5 以命令行方式运行&#xff08;windows&#xff09; 2.6 文本缩放快捷键 2.7 查看和修改快捷键 2.8 将Vitis HLS RTL 导入 Viv…

Postgresql源码(127)投影ExecProject的表达式执行分析

无论是投影还是别的计算&#xff0c;表达式执行的入口和计算逻辑都是统一的&#xff0c;这里已投影为分析表达式执行的流程。 1 投影函数 用例 create table t1(i int primary key, j int, k int); insert into t1 select i, i % 10, i % 100 from generate_series(1,1000000…

前端性能优化知识梳理

1.重要性 当我们面试的时候&#xff0c;前端性能优化方面算是必考的知识点&#xff0c;但是工作中我们又很少会重点的对项目进行前端优化&#xff0c;它真的不重要吗&#xff1f; 如果我们可以将后端响应时间缩短一半&#xff0c;整体响应时间只能减少5%~10%。而如果关注前端…

【C语言】——数据在内存中的存储

【C语言】——数据在内存中的存储 一、整数在内存中的存储1.1、整数的存储方式1.2、大小端字节序&#xff08;1&#xff09;大小端字节序的定义&#xff08;2&#xff09;判断大小端 1.3、整型练习 二、浮点数在内存中的存储2.1、引言2.2、浮点数的存储规则2.3、浮点数的存储过…

mac用Homebrew安装MySQL并配置远程登录

1. 简介 MySQL 是一个开源的关系型数据库管理系统&#xff08;RDBMS&#xff09;&#xff0c;由瑞典 MySQL AB 公司开发&#xff0c;后被 Oracle 公司收购。MySQL 使用 SQL&#xff08;Structured Query Language&#xff09;作为查询语言&#xff0c;并提供了强大的功能和性能…

python安卓自动化pyaibote实践------学习通自动刷课

前言 欢迎来到我的博客 个人主页:北岭敲键盘的荒漠猫-CSDN博客 本文是一个完成一个自动播放课程&#xff0c;避免人为频繁点击脚本的构思与源码。 加油&#xff01;为实现全部电脑自动化办公而奋斗&#xff01; 为实现摆烂躺平的人生而奋斗&#xff01;&#xff01;&#xff…

Linux——socket套接字与udp通信

目录 一、理解IP地址与端口 二、socket套接字 三、TCP与UDP的关系 四、网络字节序 五、socket编程 1.socket()创建套接字 2.填充sockaddr_in 结构体 3.bind() 绑定信息 4.recvfrom()接收消息 5.sendto()发送消息 六、UdpServer代码 一、理解IP地址与端口 IP地址是In…

【C++】详解string类

目录 简介 框架 构造 全缺省构造函数 ​编辑 传对象构造函数 拷贝构造 析构函数 容量 size() capacity&#xff08;&#xff09; empty() clear() reserve() ​编辑 resize() 遍历 检引用符号"[ ]"的重载 迭代器 begin() end() rbegin() rend(…

【触摸案例-控件不能响应的情况 Objective-C语言】

一、接下来,我们来说这个“控件不能响应的情况”, 1.素材里边,有一个“不接受用户交互的情况”,这么一个代码,把它打开, 把这个项目啊,复制过来,改一个名字,叫做“04-控件不能响应的情况”, 打开之后,command + R,运行一下, 在storyboard上,你也可以看得出来,我…

智慧农业设备——虫情监测系统

随着科技的不断进步和农业生产的日益现代化&#xff0c;智慧农业成为了新时代农业发展的重要方向。其中&#xff0c;虫情监测系统作为智慧农业的重要组成部分&#xff0c;正逐渐受到广大农户和农业专家的关注。 虫情监测系统是一种基于现代传感技术、图像识别技术和大数据分析技…

链表-----返回倒数第K个节点回文结构的判断相交链表

目录 1.返回倒数第K个节点 2.回文结构的判断 3.相交链表的判断&#xff0c;返回交点 1.返回倒数第K个节点 &#xff08;1&#xff09;返回链表的第k个节点&#xff0c;我们这里的做法是定义两个指针&#xff0c;这两个指针之间相差的是k这个长度&#xff1b;这个过程的实现就…

Android手势识别面试问题及回答

问题 1: 如何在Android中实现基本的手势识别&#xff1f; 答案: 在Android中&#xff0c;可以通过使用GestureDetector类来实现基本的手势识别。首先需要创建一个GestureDetector的实例&#xff0c;并实现GestureDetector.OnGestureListener接口来响应各种手势事件&#xff0c…

创建SpringBoot和RabbitMQ的整合项目

文章目录 创建SpringBoot和RabbitMQ的整合项目首先快速创建一个maven项目引入SpringBoot整合rabbitMQ的依赖在src/main目录下创建resources目录并引入配置文件写消息发送者MessageSender写消息接收者MessageReceiver写RabbitMQConfig配置类写SpringBoot启动主类CommandLineRunn…

小剧场短剧影视小程序源码_后端PHP

项目运行截图 源码贡献 https://githubs.xyz/boot?app42 部署说明 linux/win任选 PHP版本&#xff1a;7.3/7.2&#xff08;测试时我用的7.2要安装sg扩展 &#xff09; 批量替换域名http://video.owoii.com更换为你的 批量替换域名http://120.79.77.163:1更换为你的 这两个…

代码随想录算法训练营第60天|84.柱状图中最大的矩形

84. 柱状图中最大的矩形 题目链接&#xff1a;柱状图中最大的矩形 题目描述&#xff1a;给定 n 个非负整数&#xff0c;用来表示柱状图中各个柱子的高度。每个柱子彼此相邻&#xff0c;且宽度为 1 。 求在该柱状图中&#xff0c;能够勾勒出来的矩形的最大面积。 解题思路&#…

24 JavaScript学习:this

this在对象方法中 在 JavaScript 中&#xff0c;this 的值取决于函数被调用的方式。在对象方法中&#xff0c;this 引用的是调用该方法的对象。 让我们看一个简单的例子&#xff1a; const person {firstName: John,lastName: Doe,fullName: function() {return this.firstN…

【webrtc】MessageHandler 3: 基于线程的消息处理:以sctp测试为例

消息处理可以用于模拟发包处理G:\CDN\rtcCli\m98\src\net\dcsctp\socket\dcsctp_socket_network_test.cc 这个实现中,onMessage还是仅对了一种消息进行处理,就是接收则模式下,打印带宽。当然,可能程序有多个消息,分别在不同的onmessage中执行?SctpActor:以一个恒定的速率…

C语言贪吃蛇项目

今天给大家带来一款简单的贪吃蛇游戏&#xff0c;一起随我来看看吧 游戏效果&#xff1a; 实现基本的功能&#xff1a; • 贪吃蛇地图绘制 • 蛇吃⻝物的功能&#xff1a;&#xff08;上、下、左、右⽅向键控制蛇的动作&#xff09; • 蛇撞墙死亡 • 蛇撞⾃⾝死亡 • 计算得分…