Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 与postgres 9.6一起使用的炼金术_Python_Postgresql_Sqlalchemy_Alembic - Fatal编程技术网

Python 与postgres 9.6一起使用的炼金术

Python 与postgres 9.6一起使用的炼金术,python,postgresql,sqlalchemy,alembic,Python,Postgresql,Sqlalchemy,Alembic,我一直在尝试在raspbian操作系统环境中部署我的flask应用程序。该应用程序在ubuntu和postgres 11上运行顺利。在尝试运行sqlalchemy迁移时,我遇到了错误:未定义的符号:PQencryptPasswordConn。我后来发现缺少的库是在postgres 10和更高版本上添加的,因此在版本10之前的版本中缺少。我无法在raspbian上安装版本10或更高版本,因为它还不受支持。我唯一的选择是在我的raspberry上安装UbuntuCore,或者找到一个与Postgre

我一直在尝试在raspbian操作系统环境中部署我的flask应用程序。该应用程序在ubuntu和postgres 11上运行顺利。在尝试运行sqlalchemy迁移时,我遇到了错误:未定义的符号:PQencryptPasswordConn。我后来发现缺少的库是在postgres 10和更高版本上添加的,因此在版本10之前的版本中缺少。我无法在raspbian上安装版本10或更高版本,因为它还不受支持。我唯一的选择是在我的raspberry上安装UbuntuCore,或者找到一个与Postgres9.6兼容的SQLalchemy版本。如果有人以前遇到过我的情况或有更好的想法,我们将非常感谢您的建议

在sqlalchemy连接字符串中包含odbc驱动程序,该驱动程序与您使用的postres版本兼容。我推荐pyodbc,因为它是python imo最受支持的odbc包。我将尝试一下。非常感谢。我已经放弃并安装了ubuntu内核,但它并不像raspian那样轻量级。将在VM或docker映像上尝试此操作,如果有效,将返回raspian