當我嘗試使用 Python 的grpc_tools.protoc
庫生成 proto 檔案時:
python -m grpc_tools.protoc -I protos --python_out=. --gprc_python_out=. protos/test.proto
它失敗并出現錯誤
protoc-gen-gprc_python: program not found or is not executable
--gprc_python_out: protoc-gen-gprc_python: Plugin failed with status code 1.
我已經在我的 conda 環境中安裝了以下軟體包:
conda install -c conda-forge grpclib
conda install grpcio grpcio-tools
$ python -m grpc_tools.protoc --version
libprotoc 3.6.1
我的 conda 環境缺少什么阻止我運行上述命令?謝謝
uj5u.com熱心網友回復:
錯字。
你要--grpc_python_out=.
你有--gprc_python_out=.
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/507966.html
標籤:Python python-3.x 康达 grpc grpc-python
下一篇:如何解決匯入錯誤?