Skip to content

0.48.0 Results in ImportError: no pq wrapper available #5238

Closed

Description

@danbaron63

Expected Behavior

Postgres registry should be usable with a fresh install.

Current Behavior

Traceback (most recent call last):
  File "/feature_store/plan.py", line 8, in <module>
    fs = get_feature_store(config_file)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/feature_store/feature_store/config.py", line 20, in get_feature_store
    fs = FeatureStore(
         ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/feast/feature_store.py", line 156, in __init__
    self._registry = SqlRegistry(registry_config, self.config.project, None)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/feast/infra/registry/sql.py", line 256, in __init__
    self.write_engine: Engine = create_engine(
                                ^^^^^^^^^^^^^^
  File "<string>", line 2, in create_engine
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 602, in create_engine
    dbapi = dbapi_meth(**dbapi_args)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg.py", line 418, in import_dbapi
    import psycopg
  File "/usr/local/lib/python3.12/site-packages/psycopg/__init__.py", line 9, in <module>
    from . import pq  # noqa: F401 import early to stabilize side effects
    ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 116, in <module>
    import_from_libpq()
  File "/usr/local/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 108, in import_from_libpq
    raise ImportError(
ImportError: no pq wrapper available.
Attempts made:
- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation: libpq library not found

Steps to reproduce

Install feast as: feast[gcp,aws,grpcio,postgres]==0.48.0
Run feast plan & feast apply with a Postgres registry

Specifications

  • Version: 0.48.0
  • Platform: Linux ARM
  • Subsystem: Python 3.12

Possible Solution

Adding the following dependency appears to fix the issue: psycopg[binary,pool]

Activity

  1. franciscojavierarceo commented on Apr 8, 2025

    @franciscojavierarceo
    Member
  2. tchughesiv commented on Apr 8, 2025

    @tchughesiv
    Contributor

    we'll be releasing another version of feast shortly which will include a fix for this

  3. tchughesiv commented on Apr 8, 2025

    @tchughesiv
    Contributor

    @danbaron63 we've release patch version 0.48.1... please confirm this issue is resolved, thanks

  4. danbaron63 commented on Apr 9, 2025

    @danbaron63
    ContributorAuthor

    @danbaron63 we've release patch version 0.48.1... please confirm this issue is resolved, thanks

    Just tested and it works! Thanks for getting this out so quickly 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions