mac安装psycopg2

1.安装brew插件

终端执行:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
按照提示一步步安装即可

2.安装postgresql

终端执行:brew install postgresql

3.添加到~/.zshrc

vi ~/.zshrc
添加如下内容
export PATH=/opt/homebrew/Cellar/postgresql/14.5/bin:$PATH
执行source ~/.zshrc

4.pip3 install psycopg2即可

posted @ 2022-08-22 14:31  李有病  阅读(211)  评论(0编辑  收藏  举报
1 2