◐ Shell
clean mode source ↗

ImportError: cannot import name 'runtime_version' from 'google.protobuf'

When running Feast installed from git+https://github.com/feast-dev/feast, an ImportError is raised

Expected Behavior

No error

Current Behavior

Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 112, in _get_module_details
  File "/home/nixos/feast-repository/.venv/lib/python3.11/site-packages/feast/__init__.py", line 4, in <module>
    from feast.infra.offline_stores.bigquery_source import BigQuerySource
  File "/home/nixos/feast-repository/.venv/lib/python3.11/site-packages/feast/infra/offline_stores/bigquery_source.py", line 5, in <module>
    from feast import type_map
  File "/home/nixos/feast-repository/.venv/lib/python3.11/site-packages/feast/type_map.py", line 39, in <module>
    from feast.protos.feast.types.Value_pb2 import (
  File "/home/nixos/feast-repository/.venv/lib/python3.11/site-packages/feast/protos/feast/types/Value_pb2.py", line 9, in <module>
    from google.protobuf import runtime_version as _runtime_version
ImportError: cannot import name 'runtime_version' from 'google.protobuf' (/home/nixos/feast-repository/.venv/lib/python3.11/site-packages/google/protobuf/__init__.py)

Steps to reproduce

pip install git+https://github.com/feast-dev/feast && python -m feast.protos.feast.types.Value_pb

Specifications

  • Version: master branch
  • Platform: Linux
  • Subsystem: Build System

Possible Solution

The problem is due to incompatible protobuf versions in build system dependencies and runtime dependencies. We should make the protobuf versions consistant.