You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2021/04/03 02:49:00 UTC

[jira] [Updated] (BEAM-9508) Python installation fails if grpc_tools is not installed

     [ https://issues.apache.org/jira/browse/BEAM-9508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenneth Knowles updated BEAM-9508:
----------------------------------
    Status: Open  (was: Triage Needed)

> Python installation fails if grpc_tools is not installed
> --------------------------------------------------------
>
>                 Key: BEAM-9508
>                 URL: https://issues.apache.org/jira/browse/BEAM-9508
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: David Yan
>            Priority: P3
>
> When installing from master branch, I'm getting an exception below. Looks like the ImportError exception handling throws an exception itself. I'll manually install grpc_tools and try again but the handling of ImportError has issues.
>  
> ```
> Traceback (most recent call last):
>       File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 292, in generate_proto_files
>         from grpc_tools import protoc
>     ModuleNotFoundError: No module named 'grpc_tools'
>     
>     During handling of the above exception, another exception occurred:
>     
>     Traceback (most recent call last):
>       File "/opt/conda/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
>         self.run()
>       File "/opt/conda/lib/python3.7/multiprocessing/process.py", line 99, in run
>         self._target(*self._args, **self._kwargs)
>       File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 378, in _install_grpcio_tools_and_generate_proto_files
>         generate_proto_files(force=force)
>       File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 315, in generate_proto_files
>         protoc_gen_mypy = _find_protoc_gen_mypy()
>       File "/root/apache-beam-custom/packages/beam/sdks/python/gen_protos.py", line 233, in _find_protoc_gen_mypy
>         (fname, ', '.join(search_paths)))
>     RuntimeError: Could not find protoc-gen-mypy in /root/apache-beam-custom/bin, /root/apache-beam-custom/bin, /usr/local/bin, /opt/conda/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin
> ```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)