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'?
 

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

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

相关文章

Redux数据流架构

Redux的难点是理解它对于数据修改的规则, 下图动态展示了在整个数据的修改中&#xff0c;数据的流向 Redux代码被分为三个核心的概念&#xff0c;三个概念分别是: state: 一个对象 存放着我们管理的数据action: 一个对象 用来描述你想怎么改数据reducer: 一个函数 根据action的…

万兆以太网MAC设计(11)完整UDP协议栈仿真

文章目录 前言一、模块接口二、IP模块与ARP模块之间的联系三、整体协议栈仿真总结&#xff1a; 前言 目前除了巨帧处理逻辑之外&#xff0c;所有的准备工作都已经结束了&#xff0c;先进行整体的功能验证。 一、模块接口 所有模块接口皆采用AXIS数据流的形式&#xff0c;其中…

用Jenkins实现cherry-pick多个未入库的gerrit编译Android固件

背景: 在做Android固件开发的时候,通常我们可以利用gerrit-trigger插件,开发者提交一笔的时候自动触发jenkins编译,如果提交的这一笔的编译依赖其他gerrit才能编译过,我们可以在commit message中加入特殊字段,让jenkins在编译此笔patch的时候同时抓取依赖的gerrit代码下…

java后端项目:视积分抽奖平台

一、项目背景: 本次抽奖系统实现是在视频中内置一个线上活动抽奖系统,奖品是在一个时间段区间内均匀发布,用户可以在这个时间段内参与抽奖。 二、项目架构 活动抽奖平台采用微服务架构来完成,在功能上实现拆分为用户、网关、以及抽奖微服务,其中用户、网关是后台项目通…

三. TensorRT基础入门-TensorRT内部的优化模块

目录 前言0. 简述1.TensorRT的优化策略2. Layer Fusion3. Kernel Auto-Tuning4. Quantization总结参考 前言 自动驾驶之心推出的 《CUDA与TensorRT部署实战课程》&#xff0c;链接。记录下个人学习笔记&#xff0c;仅供自己参考 本次课程我们来学习课程第三章—TensorRT 基础入…

C++ | 类和对象(上)

目录 什么是类 类的介绍 struct在两种语言中的有何区别 私有变量命名注意点 类的作用域 类的声明定义分离 类的访问限定符 封装 类的实例化 类对象的存储 this指针 一道this指针相关的王炸题&#xff1a; 结语 什么是类 类的介绍 我们举一个日常生活中的例子&…

罗宾斯《管理学》第15版笔记/课后习题/考研真题答案

第Ⅰ篇 管理导论 第1章 工作场所中的管理者和你 1.1 知识结构导图 1.2 考点难点归纳 1.3 课后习题详解 1.4 考研真题详解 附加模块一 管理史 知识结构导图 考点难点归纳 课后习题详解 考研真题详解 第2章 决 策 2.1 知识结构导图 2.2 考点难点归纳 2.3 课后习题详解…

C之·标准库<string.h>

系列文章目录 文章目录 前言一、字符串分割函数1.strtok()2. 总结 前言 <stdlib.h> 是C语言中的一个头文件&#xff0c;提供了一系列用于操作字符串的函数。例如查找子字符串、拼接字符串、比较字符串等等。为了方便开发者进行字符串操作&#xff0c;C语言提供了一个标准…

python爬虫学习-------scrapy的第一部分(二十九天)

&#x1f388;&#x1f388;作者主页&#xff1a; 喔的嘛呀&#x1f388;&#x1f388; &#x1f388;&#x1f388;所属专栏&#xff1a;python爬虫学习&#x1f388;&#x1f388; ✨✨谢谢大家捧场&#xff0c;祝屏幕前的小伙伴们每天都有好运相伴左右&#xff0c;一定要天天…

做App小程序h5的软件 校园小程序有哪些小程序源码平台 微信小程序里发表的展示圈子 怎么将小程序分享到朋友圈小程序社区 小程序在大学校

最近几年&#xff0c;校园外卖跑腿服务市场迅速兴起。由于学生每天课程繁忙&#xff0c;很多人没有时间去食堂或外面的餐厅用餐&#xff0c;校园外卖跑腿平台提供了便捷和快速的解决方案&#xff0c;满足了学生的饮食跑腿需求&#xff0c;并受到越来越多学生的喜爱。 那么&…

C语言程序设计(二)

1、算法、数据结构、程序 为解决一个问题而采取的方法和步骤&#xff0c;就称为“算法”。 2、算法的5大特征 3、判断n是否为素数&#xff1a;只需要从2循环到根号n。 优化原理&#xff1a;素数是因子为1和本身&#xff0c; 如果num不是素数&#xff0c;则还有其他因子&…

stm32单片机开发三、DMA

DMA其实就是一种将ADC的数据寄存器、串口的数据寄存器等等一些数据放到sram中特定位置&#xff0c;方便CPU去读取 比如ADC转换&#xff0c;DMA直接转换的ADC的值放在内存中的特定位置&#xff0c;CPU可以直接去读取 uint16_t AD_Value[4]; //定义用于存放AD转换结果的全局…

上市企业数字赋能指数数据集-2001到2022年(TF-IDF)

01、数据简介 上市公司数字赋能指数是一个用来衡量上市公司利用数字技术提高业务能力和效率的指标。这个指数反映了上市公司利用大数据、云计算和人工智能等数字技术&#xff0c;高效地利用商业资源和信息&#xff0c;并扩展供应关系的能力。市公司数字赋能指数是一种综合性的…

怎么给字符串字段加索引?

怎么给字符串字段加索引&#xff1f; 现在&#xff0c;几乎所有的系统都支持邮箱登录&#xff0c;如何在邮箱这样的字段上建立合理的索引&#xff0c;是我们今天要讨论的问题。 假设&#xff0c;你现在维护一个支持邮箱登录的系统&#xff0c;用户表是这么定义的&#xff1a; …

美富特 | 邀您参加2024全国水科技大会暨技术装备成果展览会

王涛 四川美源环能科技有限公司 技术总监 报告题目&#xff1a;绿色智慧水岛如何助力工业园区污水及再生水资源化利用降碳增效 拥有十余年的环保行业从业经验&#xff0c;对各类前沿物化、生化及膜技术均有丰富的研发、设计及应用经验&#xff0c;先后参与多项重点核心技术…

日本宇宙航空研究“Int-Ball2”自由飞行相机机器人采用的Epson IMU

IMU有助于飞行的稳定控制和电池充电的自动对接- 精工爱普生公司&#xff08;TSE:6724&#xff0c;“Epson”&#xff09;很高兴地宣布&#xff0c;日本宇宙航空研究开发机构&#xff08;JAXA&#xff09;选择了爱普生M-G370系列的惯性测量单元&#xff08;IMU&#xff09;&…

开源相机管理库Aravis例程学习(五)——camera-api

开源相机管理库Aravis例程学习&#xff08;五&#xff09;——camera-api 简介例程代码函数说明arv_camera_get_regionarv_camera_get_pixel_format_as_stringarv_camera_get_pixel_formatARV_PIXEL_FORMAT_BIT_PER_PIXEL 简介 本文针对官方例程中的&#xff1a;03-camera-api…

Swift - 可选项(Optional)

文章目录 Swift - 可选项&#xff08;Optional&#xff09;1. 可选项&#xff08;Optional&#xff09;2. 强制解包&#xff08;Forced Unwrapping&#xff09;3. 判断可选项是否包含值4. 可选项绑定&#xff08;Optional Binding&#xff09;5. 等价写法6. while循环中使用可选…

【论文阅读】互连网络的负载平衡路由算法 (CQR, Channel Queue Routing 通道队列路由)

Channel Queue Routing (CQR) 通道队列路由 1. Channel Queue Routing (CQR) 的动机 (1) 排队论(queueing theory)模型(2) GAL’s latency on tornado traffic(3) Routing tornado traffic with CQR 2. Channel Queue Routing 通道队列路由3. CQR 的性能4. 总结 Channel Queu…

白话机器学习1:分类问题中的评价指标

机器学习中的评价指标非常多&#xff0c;它们用来衡量模型的性能和预测能力。不同类型的机器学习任务可能需要不同的评价指标。以下是一些常见的评价指标&#xff0c;按照不同类型的机器学习任务分类&#xff1a; 对于分类问题&#xff1a; 准确率&#xff08;Accuracy&#…