PaddlePaddle / Serving

A flexible, high-performance carrier for machine learning models(『飞桨』服务化部署框架)
Apache License 2.0
901 stars 250 forks source link

安装serving失败, ERROR: Could not build wheels for grpcio, grpcio-tools #1982

Open beike6688 opened 10 months ago

beike6688 commented 10 months ago

环境: windows10 使用 Docker Desktop虚拟Linux docker镜像: paddlepaddle/paddle:2.6.0 python版本: python3.10.13

无法成功安装PaddleServing

wget https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-0.9.0.post102-py3-none-any.whl
pip3 install paddle_serving_server_gpu-0.9.0.post102-py3-none-any.whl

报错, 0.8.3版也是一样的报这个错误。

ERROR: Failed building wheel for grpcio-tools
Failed to build grpcio grpcio-tools
ERROR: Could not build wheels for grpcio, grpcio-tools, which is required to install pyproject.toml-based projec

安装时第一次失败的地方:

     distutils.errors.CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for grpcio
  Building wheel for grpcio-tools (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for grpcio-tools (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [2056 lines of output]
      <string>:21: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      running bdist_wheel
      running build
      running build_py
      creating build

第二次报错:

x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DHAVE_PTHREAD=1 -I. -Igrpc_root -Igrpc_root/include -Ithird_party/protobuf/src -I/usr/include/python3.10 -c third_party/protobuf/src/google/protobuf/descriptor.pb.cc -o build/temp.linux-x86_64-cpython-310/third_party/protobuf/src/google/protobuf/descriptor.pb.o -std=c++11 -fno-wrapv -frtti
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for grpcio-tools
Failed to build grpcio grpcio-tools
ERROR: Could not build wheels for grpcio, grpcio-tools, which is required to install pyproject.toml-based projects
github-actions[bot] commented 10 months ago

Message that will be displayed on users' first issue

magicleo commented 10 months ago

同问,解决了吗?

heavengate commented 9 months ago

看着是grpcio编译失败,pip install -r requirements.txt或者pip install --upgrade grpcio试下呢

dp9212 commented 5 months ago

使用python 3.7 版本,先安装PaddleOCR/requirements.txt依赖

Gavinfornever commented 4 months ago

/usr/local/bin/python3.7 -m pip install grpcio grpcio-tools -i https://pypi.tuna.tsinghua.edu.cn/simple