我正在学习如何将 Postgres 与 Python (sqlalchemy) 结合使用。我在安装 psycopg2
时卡住了。我有以下错误:
找不到 pg_config 可执行文件错误
我知道这是一个非常常见的错误,并且已经有很多关于这个的答案,但我找不到任何东西来帮助我解决我的问题。
这个我特别不懂answers :
add the path to Postgres to your .profile file by appending the following:
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
这是什么意思?我应该怎么做?
我还尝试在我的终端中输入 which -a pg_config
但没有任何反应。
非常感谢!
最佳答案
输入问题解决
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
在安装 psycopg2
之前进入终端窗口。
关于macos - 如何在 Mac 上安装 psycopg2(找不到 pg_config 可执行文件错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41740795/