On Saturday, January 15, 2022 at 4:29:21 AM UTC+11 Lidi Zheng wrote:

> Yes, there is an issue tracking this bug: 
> https://github.com/grpc/grpc/issues/28387.
>
> So far, this issue only presents on Python 3.10.
>

Thank you. I have commented on the ticket to put up my hand in helping 
debug this with some help from you.
 

>
> On Thursday, January 13, 2022 at 10:22:32 PM UTC-8 amits...@gmail.com 
> wrote:
>
>> Hi all, 
>>
>> I installed grpcio-tools using the poetry python packager using poetry 
>> add grpcio-tools. I have verified it's the same issue described below 
>> if I use pip directly. 
>>
>> When trying to use grpcio-tools on Python 3.10 - Mac M1, I am running 
>> into this error when generating some Python code: 
>>
>> % poetry run python -m grpc_tools.protoc --python_out=. 
>> --grpc_python_out=. user_sessions.proto 
>> Traceback (most recent call last): 
>> File 
>> "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py",
>>  
>>
>> line 196, in _run_module_as_main 
>> return _run_code(code, main_globals, None, 
>> File 
>> "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py",
>>  
>>
>> line 86, in _run_code 
>> exec(code, run_globals) 
>> File 
>> "/Users/echorand/Library/Caches/pypoetry/virtualenvs/user-sessions-2yjUCcPI-py3.10/lib/python3.10/site-packages/grpc_tools/protoc.py",
>>  
>>
>> line 20, in <module> 
>> from grpc_tools import _protoc_compiler 
>> ImportError: 
>> dlopen(/Users/echorand/Library/Caches/pypoetry/virtualenvs/user-sessions-2yjUCcPI-py3.10/lib/python3.10/site-packages/grpc_tools/_
>> protoc_compiler.cpython-310-darwin.so, 
>> 0x0002): tried: 
>>
>> '/Users/echorand/Library/Caches/pypoetry/virtualenvs/user-sessions-2yjUCcPI-py3.10/lib/python3.10/site-packages/grpc_tools/_
>> protoc_compiler.cpython-310-darwin.so' 
>> (mach-o file, but is an incompatible architecture (have 'x86_64', need 
>> 'arm64e')), '/usr/lib/_protoc_compiler.cpython-310-darwin.so' (no such 
>> file) 
>>
>> I tried this next: 
>>
>> % arch -x86_64 poetry run python -m grpc_tools.protoc --proto_path . 
>> --python_out=. --grpc_python_out=. user_sessions.proto 
>>
>> And that works. So, perhaps an issue with the universal binary wheel 
>> of grpcio-tools I am using and it's non compatibility with arm64? 
>>
>> Thanks, 
>> Amit. 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/6a92e423-52a4-4a4b-a3df-d94c12a36147n%40googlegroups.com.

Reply via email to