Python の grpcio がビルドできない

投稿者: ytyng 3年, 2ヶ月 前

firebase-admin などで依存しているライブラリ

grpcio 1.35.0 あたりをインストールしようとして

 raise CommandError(
commands.CommandError: Failed `build_ext` step:
Traceback (most recent call last):
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
_classic_spawn(self, command)
File "/usr/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/src/python/grpcio/commands.py", line 267, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile
multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
File "/usr/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/setup.py'"'"'; __file__='"'"'/tmp/pip-install-btumpli3/grpcio_661e3a031b984ee589514363a3992607/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1k_g3jbc/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/grpcio Check the logs for full command output.
/


こうなる場合

とりいそぎなら、grpcio 1.30.0 ならインストールできるかも

pip install grpcio==1.30.0

現在の評価: 3.5

コメント

アーカイブ

2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011