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 ... done
  Getting requirements to build wheel ... error
  error: 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): .git
      Traceback (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 main
          json_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_wheel
          return 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_wheel
          return 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_requires
          self.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_setup
          super().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_setup
          exec(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, seqeval
  Building wheel for onnx (pyproject.toml) ... error
  error: 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): .git
      C:\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 future
              versions. Please use the underscore name 'license_file' instead.

              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or 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_wheel
      running build
      running build_py
      running create_version
      running cmake_build
      Using 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 2022
      CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake 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 - done
      CMake Warning (dev) at CMakeLists.txt:114 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the 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 modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the 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.proto
      CMake Error at CMakeLists.txt:292 (message):
        Protobuf compiler not found
      Call 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 main
          json_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_wheel
          return _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_wheel
          return 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_dir
          self.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_setup
          super().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_setup
          exec(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 setup
          return 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 setup
          return 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_commands
          dist.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_commands
          self.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_command
          super().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_command
          cmd_obj.run()
        File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
          self.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_command
          self.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_command
          super().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_command
          cmd_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 run
          self.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_command
          self.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_command
          super().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_command
          cmd_obj.run()
        File "<string>", line 233, in run
        File "C:\Users\GW00227659\AppData\Local\Temp\pip-build-env-xzlgyxam\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.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_command
          super().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_command
          cmd_obj.run()
        File "<string>", line 219, in run
        File "E:\python3.12\Lib\subprocess.py", line 413, in check_call
          raise 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 onnx
  Building wheel for ffmpy (pyproject.toml) ... done
  Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5607 sha256=7f5100e5417f0e937537a8a31a1ec96fed2b914e5ccaee15044851db5c0adf07
  Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\08\c5\8a\310ab3add33cd0284165ab43f11f77104184473544fdf4efd3
  Building wheel for jieba (pyproject.toml) ... done
  Created wheel for jieba: filename=jieba-0.42.1-py3-none-any.whl size=19314474 sha256=982d656865bf5e3af1e16e3f028da8f818e1c455a4ccfd61f72639ea2cd15c83
  Stored in directory: c:\users\gw00227659\appdata\local\pip\cache\wheels\7b\3a\3e\1bf625b8dd63d53265aad527b244647c679dff9b60588a324f
  Building wheel for seqeval (pyproject.toml) ... done
  Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16186 sha256=a01810a8d4efcbb8769e6237e10ed26851e8c14452c253a1cc6add951db7f304
  Stored 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_main
  File "<frozen runpy>", line 88, in _run_code
  File "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, ResourceNotFoundError
  File "E:\software\python_env\Lib\site-packages\paddlehub\utils\paddlex.py", line 19, in <module>
    from paddlehub.server.server import module_server
  File "E:\software\python_env\Lib\site-packages\paddlehub\server\__init__.py", line 17, in <module>
    from paddlehub.server.git_source import GitSource
  File "E:\software\python_env\Lib\site-packages\paddlehub\server\git_source.py", line 30, in <module>
    from paddlehub.module.module import RunModule
  File "E:\software\python_env\Lib\site-packages\paddlehub\module\__init__.py", line 16, in <module>
    from .module import Module
  File "E:\software\python_env\Lib\site-packages\paddlehub\module\module.py", line 29, in <module>
    from paddlehub.compat import paddle_utils
  File "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.mfbz.cn/a/581730.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Java中集合概述(补充ing)

一、集合分类 Java中的集合框架提供了多种类型的集合&#xff0c;主要分为两大类&#xff1a;单列集合&#xff08;只保存单一类型的对象&#xff09;和双列集合&#xff08;保存具有键值对关系的对象&#xff09;。下面对这些集合进行分类介绍&#xff0c;但由于源码分析会涉…

开源相机管理库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…

沉浸式翻译 chrome 插件 Immersive Translate - Translate Website PDF

免费翻译网站&#xff0c;翻译PDF和Epub电子书&#xff0c;双语翻译视频字幕 &#x1f4e3; 网络上口碑爆炸的网站翻译扩展工具【沉浸式翻译】⭐⭐⭐⭐⭐ &#x1f4bb; 功能特点如下&#xff1a; &#x1f4f0; 网站翻译 &#x1f680; 提供双语网站翻译&#xff0c;智能识…

618科技嘉年华!五款极致科技产品,开启智能生活新篇章!

准备好迎接一年一度的618了吗&#xff1f;这不仅仅是一场购物的狂欢&#xff0c;更是一次科技的盛宴&#xff0c;一次智能生活的全新启航。今年&#xff0c;我们将带来五款令人瞩目的极致科技产品&#xff0c;它们将彻底颠覆你对智能生活的认知。从娱乐到工作&#xff0c;这些产…

【Node.js工程师养成计划】之原生node开发web服务器

一、使用node创建http服务器 var http require(http);// 获取到服务器实例对象 var server http.createServer() server.listen(8080, function() {console.log(http://127.0.0.1:8080); })server.on(request, function(req, res){console.log(request);res.write(6666666688…

《微服务设计》读书笔记

此为阅读纽曼《微服务设计》一书后总结的读书笔记&#xff0c;点此处下载PDF文档。 一、微服务的概念 微服务&#xff08;或称微服务架构&#xff09;是一种云原生架构方法&#xff0c;其核心思想在于将单个应用拆分为众多 小型、松散耦合的服务&#xff0c;服务之间均通过网…

百度语音识别的springboot应用

1、pom依赖 <dependency> <groupId>com.baidu.aip</groupId> <artifactId>java-sdk</artifactId> <version>4.16.18</version> </dependency> 2、测试的demo 创建语音识别应用 百度智能云-管理中心 (baidu.com) 代码中要…

十大USDT交易平台大全XEX交易所

USDT是一种基于比特币区块链网络的加密代币&#xff0c;主要运用于数字货币交易平台&#xff0c;以稳定币为主。USDT的核心价值在于其与真实货币的固定兑换比率1:1&#xff0c;所以被称为Tether。随着加密货币市场的不断壮大&#xff0c;越来越多的交易平台开始支持USDT&#x…

Android 设置头像 - 裁剪及圆形头像

书接上文 Android 设置头像 - 相册拍照&#xff0c;通过相册和照片的设置就可以获取到需要的头像信息&#xff0c;但是在通常情况下&#xff0c;我们还想要实现针对头像的裁剪功能和圆形头像功能。 先上截图&#xff1a; 图像裁剪 通常裁剪可以分为程序自动裁剪和用户选择裁剪…

上位机图像处理和嵌入式模块部署(树莓派4b设置ftp下载)

【 声明&#xff1a;版权所有&#xff0c;欢迎转载&#xff0c;请勿用于商业用途。 联系信箱&#xff1a;feixiaoxing 163.com】 作为一个开发板&#xff0c;最好支持ftp下载&#xff0c;这样文件的上传和下载都会比较方便。虽然目前为止&#xff0c;利用mobaxterm和ssh也能实现…

8.11 分析工具 8.14 设计工具

一、分析工具 &#xff08;一&#xff09;结构化分析 1、数据流图&#xff08;DFD&#xff09; &#xff08;1&#xff09;数据流图 从数据传递、加工的角度&#xff0c;以图形刻画系统内的数据运动情况。全面描述系统逻辑模型的工具。通过符号&#xff0c;表示出数据流动、…

C++中的数据结构与算法

随处可见的红黑树 一般会用到[key,value]。 例如github中这个例子&#xff0c;第一个是访问网站&#xff0c;第二个是访问次数&#xff0c;但是这个不是静态的&#xff0c;这有个动态排序&#xff0c;并且当我们需要让相应的访问次数加1的时候&#xff0c;我们用红黑树查找的时…

VS2022 嘿嘿

还是大二的时候就开始用这个&#xff0c;但居然是为了用PB&#xff0c;-_-|| 用了段时间换成了C#&#xff0c;依稀还记得大佬们纠正我的读法&#xff0c;别读C井&#xff0c;应该读C夏普。。。 安装过程其实也没啥&#xff0c;就是关键Key得花时间找&#xff0c;我好不容易搞…

【论文阅读】互连网络的负载平衡路由算法 (GAL, Globally Adaptive Load-balancing 全局自适应负载平衡)

Globally Adaptive Load-balancing 全局自适应负载平衡 GAL: Globally Adaptive Load-balanced routing 全局自适应负载平衡路由 1. GAL on a ring2. GAL on higher dimensional torus3. 实验性能4. 算法稳定性 Stability总结 References Globally Adaptive Load-balancing 全…

探索数学的奇妙世界:Mathematica之美【上】

文章目录 一、二维函数作图1.二维函数作图命令Plot2.曲线样式3.重画和组合图形4.二维函数绘图 二、三维函数作图1.函数作图命令Plot3D2.三维参数作图 三、等值线图和密度图1.等值线图2.密度图3.图形之间的转换 四、数据绘图1.二维数据绘图2.三维数据绘图 总结 一、二维函数作图…

限流--4种经典限流算法讲解--单机限流和分布式限流的实现

为什么需要限流 系统的维护使用是需要成本的&#xff0c;用户可能使用科技疯狂刷量&#xff0c;消耗系统资源&#xff0c;出现额外的经济开销问题&#xff1a; 控制成本>限制用户的调用次数用户在短时间内疯狂使用&#xff0c;导致服务器资源被占满&#xff0c;其他用户无…

深度学习-线性回归+基础优化算法

目录 线性模型衡量预估质量训练数据参数学习训练损失最小化损失来学习参数显式解 总结基础优化梯度下降选择学习率 小批量随机梯度下降选择批量大小 总结线性回归的从零开始实现实现一个函数读取小批量效果展示这里可视化看一下 线性回归从零开始实现线性回归的简洁实现效果展示…

selenium在Pycharm中结合python的基本使用、交互、无界面访问

下载 下载与浏览器匹配的浏览器驱动文件&#xff0c;这里一定注意的是&#xff0c;要选择和浏览器版本号相同的驱动程序&#xff0c;否则后面会有很多问题。 &#xff08;1&#xff09;浏览器&#xff08;以google为例&#xff09;版本号的查询&#xff1a; 我这里的版本号是1…

大规模数据处理和分析

大规模数据处理和分析&#xff1a;随着大数据技术的发展&#xff0c;处理大规模数据集的能力成为了一种竞争优势。热门问题包括数据清洗、特征工程、分布式计算等。 当我们谈到大规模数据处理和分析时&#xff0c;通常涉及到以下几个方面的内容&#xff1a; 数据清洗&#xff1…

C语言 | Leetcode C语言题解之第55题跳跃游戏

题目&#xff1a; 题解&#xff1a; #define max(a, b) (((a) > (b)) ? (a) : (b))bool canJump(int* nums, int numsSize){int cover 0;int i;// 只可能获取cover范围中的步数&#xff0c;所以i<coverfor(i 0; i < cover; i) {// 更新cover为从i出发能到达的最大…
最新文章