Saki's 研究记录

(MAC Big Sur 12.1) ImportError: dlopen libpq
问题在python脚本中连接postgres时遇到以下问题: 12345678Traceback (most recent call last): File "/Users/shenshijie/Documents/app/postgres/connect.py", line 2, in <module> import psycopg2 File "/opt/homebrew/lib/python3.9/site-packages/psycopg2/__init__.py", line 51, in <module>...
docker-compose部署postgres并解决connection refused错误
One of the biggest benefits of using docker for me has been the fact that it makes developing code with databases much simpler. 每当我想构建一个项目的时,倾向于使用postgres作为数据库。在Docker还没出现前,需要手动安装postgres到我本地机器,拉起服务,创建数据库表,创建指定的用户和对应的权限,最后在本地拉起项目来测试和开发。整个流程下来几个小时就过去了。 Docker出现后,事情变得异常简单。特别是在配合docker-compose使用后,...