Seeing error while installing grpcio-tools ==1.18.0

154 views
Skip to first unread message

Ramana Reddy

unread,
May 28, 2024, 1:06:51 PMMay 28
to grp...@googlegroups.com
We are trying to install python3 -m pip install grpcio==1.18.0 on the Ubuntu 24.04 machine with python3.12. But we seeing the following error:

          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
          raise CompileError(msg)
      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
  Running setup.py clean for grpcio
Failed to build grpcio
ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects

This is the case with installing grpcio == 1.48.1 as well. 

How we can install old versions ( other than the default versions) in the system. 

We can build these grpcto-tools and grpc-io from the grpc source as well. In that process, grpcio-tools bring a protoful version from the cached wheel. How can I specify the protobuf version( this should be reflected here: python3 -m grpc.tools.protoc --version)  which I installed on the system. We have been using the old protoc and protobuf-c and want to use the same for sometime and trying to bring the compatible grpcio and grpcio-tools 

Thanks & Regards,
Ramana  

Richard Belleville

unread,
May 28, 2024, 2:24:26 PMMay 28
to Ramana Reddy, grp...@googlegroups.com
Ramana, this message implies a compilation issue. Search higher in the logs for the string "error: ". It's likely that you simply need to install a build dependency.

Thanks,
Richard Belleville

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAL2CrsMmeJmzu6axTZW987pYG-ZRyAXKRfC7gtJb1-51gjoQmQ%40mail.gmail.com.

Ramana Reddy

unread,
May 28, 2024, 10:20:41 PMMay 28
to Richard Belleville, grp...@googlegroups.com
Thanks, I'll check it out. 

Ramana Reddy

unread,
May 28, 2024, 10:52:45 PMMay 28
to Richard Belleville, grp...@googlegroups.com
It seems to the python code has been changed a lot and could not able to compile with python3.12 

      grpc_tools/_protoc_compiler.cpp:1856:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_value’
       1856 |     tmp_value = tstate->curexc_value;
            |                         ^~~~~~~~~~~~
      grpc_tools/_protoc_compiler.cpp:1857:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
       1857 |     tmp_tb = tstate->curexc_traceback;
            |                      ^~~~~~~~~~~~~~~~
      grpc_tools/_protoc_compiler.cpp:1858:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_type’
       1858 |     tstate->curexc_type = type;
            |             ^~~~~~~~~~~
      grpc_tools/_protoc_compiler.cpp:1859:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_value’
       1859 |     tstate->curexc_value = value;
            |             ^~~~~~~~~~~~
      grpc_tools/_protoc_compiler.cpp:1860:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
       1860 |     tstate->curexc_traceback = tb;
            |             ^~~~~~~~~~~~~~~~

On Tue, May 28, 2024 at 11:54 PM Richard Belleville <rbel...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages