Код: Выделить всё
solver-service
├── main.py
└── protos/
├── __init__.py
├── __pycache__
│ └── ...
├── generate_pb.py
├── solver.proto
├── solver_pb2.py
└── solver_pb2_grpc.py
Код: Выделить всё
solver-service$ python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import protos.solver_pb2
>>> import protos.solver_pb2_grpc
Traceback (most recent call last):
File "", line 1, in
File "/abs/path/to/solver-service/protos/solver_pb2_grpc.py", line 4, in
import solver_pb2 as solver__pb2
ImportError: No module named 'solver_pb2'
Подробнее здесь: https://stackoverflow.com/questions/460 ... -in-python
Мобильная версия