gpt4 book ai didi

python - Fedora30 上 libpq.so.5 和 PQencryptPasswordConn 版本 RHPG_10 的问题

转载 作者:行者123 更新时间:2023-12-02 16:56:03 25 4
gpt4 key购买 nike

我正在尝试运行我的 python 脚本,但出现以下错误。我尝试以不同的方式安装和卸载 psycopg2,但无法正常工作。我的 postgres 版本是 9.6,我的 psycopg2 版本是 2.8.2。有人有同样的问题吗?提前致谢。

   Traceback (most recent call last):
File "server.py", line 89, in <module>
cfg = Config(application, WSGI_PATH_PREFIX)
File "server.py", line 60, in __init__
self.mgrs = managers.register_managers(self.app)
File "api/managers_fourwalls.py", line 31, in register_managers
return Managers(app)
File "api/managers_fourwalls.py", line 41, in __init__
self.FourwallsEngine = four_walls({"posgres_db": self.DataManager.pg_connection_string})
File "api/engine/four_walls_engine.py", line 14, in __init__
self.engine = create_engine(self.db_string)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 554, in dbapi
import psycopg2
File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so: symbol PQencryptPasswordConn version RHPG_10 not defined in file libpq.so.5 with link time reference

最佳答案

我解决了独立安装二进制文件的问题:

pip install psycopg2-binary

关于python - Fedora30 上 libpq.so.5 和 PQencryptPasswordConn 版本 RHPG_10 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56379922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com