无法在 Mac 上安装支持 python3 的 postgres

jav*_*dba 5 python postgresql plpython

和都已安装在我的系统上postgres-因此尝试了以下操作:python3High Sierra

brew upgrade  postgres --with-python
Run Code Online (Sandbox Code Playgroud)

我原以为--with-python只会安装postgres plpython3u 语言支持。然而它试图[重新]安装 python 本身。

  /usr/local/Cellar/sqlite/3.26.0: 11 files, 3.7MB
==> Installing postgresql dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring python-3.7.2.high_sierra.bottle.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Directory not empty @ dir_s_rmdir - /usr/local/opt/python3
Error: Directory not empty @ dir_s_rmdir - /usr/local/opt/python3
Run Code Online (Sandbox Code Playgroud)

然后当尝试加载时plpython3u我们看到:

19:44:24/sbgmaster2 $psql
psql (10.3)
Type "help" for help.

myuser=# CREATE LANGUAGE plpython3u;
ERROR:  could not access file "$libdir/plpython3": No such file or directory
Run Code Online (Sandbox Code Playgroud)

那么如何plpyton3u安装呢?

注意:这是关于编程主题)的,因为这是为了使用UDF -user defined functions纯粹用于编程。