5

I'm using the very latest Ubuntu 21.04 for aarch64. In order to experiment with gRPC, I installed grpc stuff:

python3 -m pip install grpc
python3 -m pip install grpcio-tools

I also tried:

pip3 install grpc
pip3 install grpcio-tools

These appeared to be successful however when I tried to generate my gRPC Python code from the .proto file, I was told by the system that grpcio-tools is not installed.

How to fix this? Is Ubuntu for aarch64 just broken?

Whuddawuh
  • 85
  • 1
  • 7

3 Answers3

3

For me the problem was that I used python instead of python3 when executed the generation:

python3 -m grpc_tools.protoc --help
laplasz
  • 3,359
  • 1
  • 29
  • 40
1

I don't have access to an ARM64 instance and so can't repro this.

According to Running gRPC and Protobuf on ARM64 (on Linux), it should be supported (with Python)

Please include in your question more details.

For me on Ubuntu 20.04 on an AMD64:

python -m grpc_tools.protoc --help
/usr/bin/python: No module named grpc_tools

python -m venv venv
source venv/bin/activate

python3 -m pip install grpcio grpcio-tools

Collecting grpcio
  Using cached grpcio-1.39.0-cp38-cp38-manylinux2014_x86_64.whl (4.3 MB)
Collecting grpcio-tools
  Using cached grpcio_tools-1.39.0-cp38-cp38-manylinux2014_x86_64.whl (2.5 MB)
Collecting six>=1.5.2
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: setuptools in ./venv/lib/python3.8/site-packages (from grpcio-tools) (44.0.0)
Collecting protobuf<4.0dev,>=3.5.0.post1
  Using cached protobuf-3.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
Installing collected packages: six, grpcio, protobuf, grpcio-tools
Successfully installed grpcio-1.39.0 grpcio-tools-1.39.0 protobuf-3.17.3 six-1.16.0

python -m grpc_tools.protoc --help

Usage: /${HOME}/venv/lib/python3.8/site-packages/grpc_tools/protoc.py [OPTION] PROTO_FILES
Parse PROTO_FILES and generate output based on the options given:
...

And, I can run e.g. the hello-world Python sample

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • At it happens I was trying to run a modified version of their hello world example. You could try running this in Qemu if you want to reproduce it. – Whuddawuh Aug 06 '21 at 17:59
0

It worked for me after closing both VSCode and Terminal, and starting them again.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Nazir A
  • 71
  • 2
  • 4