Is your feature request related to a problem? Please describe.
I had difficulty installing grpcio with a pre-release version of Python 3.13. This is needed for our team to prepare for pre-releases in advance of formal runtime releases. I tried installing 3.13.0a1 but received an error which appears in this build log. A snippet of the stack trace is included below.
Describe the solution you'd like
A successful install of grpcio with a pre-release version of python 3.13.
Describe alternatives you've considered
Another alternative is to install grpcio from source using these instructions but I haven't been able to complete it. The build fails with error: #error Extensions have been poisoned due to missing Cython-generated code.
Additional context
Add any other context about the feature request here.
Stack trace when running pip install grpcio with python 3.13.0a1 (which installs from source)
2023-11-12T11:15:08.7844994Z During handling of the above exception, another exception occurred:
2023-11-12T11:15:08.7845133Z
2023-11-12T11:15:08.7845256Z Traceback (most recent call last):
2023-11-12T11:15:08.7845901Z File "/tmp/pip-install-f6o70cce/grpcio_1c13ab2e1dde4bd4bbc72c499b893a34/src/python/grpcio/commands.py", line 313, in build_extensions
2023-11-12T11:15:08.7846058Z build_ext.build_ext.build_extensions(self)
2023-11-12T11:15:08.7846764Z File "/tmp/pip-build-env-lff5_e0r/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
2023-11-12T11:15:08.7846892Z self._build_extensions_serial()
2023-11-12T11:15:08.7847640Z File "/tmp/pip-build-env-lff5_e0r/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
2023-11-12T11:15:08.7847756Z self.build_extension(ext)
2023-11-12T11:15:08.7848416Z File "/tmp/pip-build-env-lff5_e0r/overlay/lib/python3.13/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
2023-11-12T11:15:08.7848557Z _build_ext.build_extension(self, ext)
2023-11-12T11:15:08.7849259Z File "/tmp/pip-build-env-lff5_e0r/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
2023-11-12T11:15:08.7849390Z objects = self.compiler.compile(
2023-11-12T11:15:08.7849499Z ^^^^^^^^^^^^^^^^^^^^^^
2023-11-12T11:15:08.7850434Z File "/tmp/pip-install-f6o70cce/grpcio_1c13ab2e1dde4bd4bbc72c499b893a34/src/python/grpcio/_parallel_compile_patch.py", line 63, in _parallel_compile
2023-11-12T11:15:08.7850700Z multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
2023-11-12T11:15:08.7851331Z File "/opt/hostedtoolcache/Python/3.13.0-alpha.1/x64/lib/python3.13/multiprocessing/pool.py", line 367, in map
2023-11-12T11:15:08.7851565Z return self._map_async(func, iterable, mapstar, chunksize).get()
2023-11-12T11:15:08.7851712Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-12T11:15:08.7852247Z File "/opt/hostedtoolcache/Python/3.13.0-alpha.1/x64/lib/python3.13/multiprocessing/pool.py", line 774, in get
2023-11-12T11:15:08.7852361Z raise self._value
2023-11-12T11:15:08.7852911Z File "/opt/hostedtoolcache/Python/3.13.0-alpha.1/x64/lib/python3.13/multiprocessing/pool.py", line 125, in worker
2023-11-12T11:15:08.7853049Z result = (True, func(*args, **kwds))
2023-11-12T11:15:08.7853159Z ^^^^^^^^^^^^^^^^^^^
2023-11-12T11:15:08.7853708Z File "/opt/hostedtoolcache/Python/3.13.0-alpha.1/x64/lib/python3.13/multiprocessing/pool.py", line 48, in mapstar
2023-11-12T11:15:08.7853824Z return list(map(*args))
2023-11-12T11:15:08.7853914Z ^^^^^^^^^^^^^^^^
2023-11-12T11:15:08.7854642Z File "/tmp/pip-install-f6o70cce/grpcio_1c13ab2e1dde4bd4bbc72c499b893a34/src/python/grpcio/_parallel_compile_patch.py", line 58, in _compile_single_file
2023-11-12T11:15:08.7854867Z self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
2023-11-12T11:15:08.7855519Z File "/tmp/pip-build-env-lff5_e0r/overlay/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
2023-11-12T11:15:08.7855642Z raise CompileError(msg)
2023-11-12T11:15:08.7855990Z distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
2023-11-12T11:15:08.7856074Z
2023-11-12T11:15:08.7856168Z [end of output]
Stack trace when installing from source using these instructions.
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_WIN32_WINNT=1536 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"Python\" -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"1.60.0.dev0\" -DGPR_BACKWARDS_COMPATIBILITY_MODE=1 -DHAVE_CONFIG_H=1 -DGRPC_ENABLE_FORK_SUPPORT=1 -DGRPC_DO_NOT_INSTANTIATE_POSIX_POLLER=1 -D__STDC_FORMAT_MACROS "-DPyMODINIT_FUNC=extern \"C\" __attribute__((visibility (\"default\"))) PyObject*" -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 -Isrc/python/grpcio -Iinclude -I. -Ithird_party/abseil-cpp -Ithird_party/address_sorting/include -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares -Ithird_party/cares/config_linux -Ithird_party/re2 -Ithird_party/boringssl-with-bazel/src/include -Ithird_party/upb -Isrc/core/ext/upb-gen -Isrc/core/ext/upbdefs-gen -Ithird_party/utf8_range -Ithird_party/xxhash -Ithird_party/zlib -I/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/envs/py31013/include -I/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/include/python3.10 -c /usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/poison.c -o pyb/temp.linux-x86_64-cpython-310/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/poison.o -std=c++14 -fvisibility=hidden -fno-wrapv -fno-exceptions -pthread
cc1: warning: command-line option ‘-std=c++14’ is valid for C++/ObjC++ but not for C
/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/poison.c:1:2: error: #error Extensions have been poisoned due to missing Cython-generated code.
1 | #error Extensions have been poisoned due to missing Cython-generated code.
| ^~~~~
creating None/tmp/tmpuv6tsi0a
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/envs/py31013/include -I/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/include/python3.10 -c /tmp/tmpuv6tsi0a/a.c -o None/tmp/tmpuv6tsi0a/a.o
Traceback (most recent call last):
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/_spawn_patch.py", line 58, in _commandfile_spawn
_classic_spawn(self, command, **kwargs)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/commands.py", line 313, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
_build_ext.build_extension(self, ext)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
File "/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/_parallel_compile_patch.py", line 63, in _parallel_compile
multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
File "/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
File "/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/google/home/partheniou/.pyenv/versions/3.10.13/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/usr/local/google/home/partheniou/git/google-cloud-python/grpc/src/python/grpcio/_parallel_compile_patch.py", line 58, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/tmp/pip-build-env-tr7shjfu/overlay/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
Is your feature request related to a problem? Please describe.
I had difficulty installing
grpciowith a pre-release version of Python 3.13. This is needed for our team to prepare for pre-releases in advance of formal runtime releases. I tried installing3.13.0a1but received an error which appears in this build log. A snippet of the stack trace is included below.Describe the solution you'd like
A successful install of
grpciowith a pre-release version of python 3.13.Describe alternatives you've considered
Another alternative is to install grpcio from source using these instructions but I haven't been able to complete it. The build fails with
error: #error Extensions have been poisoned due to missing Cython-generated code.Additional context
Add any other context about the feature request here.
Stack trace when running
pip install grpciowith python3.13.0a1(which installs from source)Stack trace when installing from source using these instructions.