Error: could not determine PostgreSQL version from '10.5'
mac環(huán)境下絮姆,安裝一個(gè)Python項(xiàng)目的依賴出了錯(cuò),安裝了PostgreSQL蓖宦,然后好像是版本高了,報(bào)了這個(gè)錯(cuò)
多方參考油猫,解決如下
1.brew uninstall postgresql
卸掉這個(gè)版本
2.brew search postgresql
然后就會(huì)出現(xiàn)可選的版本號(hào)
3.憑感覺選一個(gè)靠譜的版本
brew install postgresql@9.5
4.修改一下.bash_profile
cd ~
touch .bash_profile
open -e .bash_profile
此時(shí)打開了這個(gè)文件稠茂,自己看一下postgresql的目錄,我按照我的加了
export PATH=/usr/local/Cellar/postgresql@9.5/9.5.14/bin:$PATH
然后
source .bash_profile
5.pip install -r requirements.txt
到這里就解決了
在這個(gè)過程里遇到些其他的幺蛾子都是可以搜到解決方法的