自制无法安装postgresql;python 64位错误

自制无法安装postgresql;python 64位错误,python,macos,postgresql,homebrew,Python,Macos,Postgresql,Homebrew,我在运行时出错 $brew安装postgresql ==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2 File already downloaded in /Users/neil/Library/Caches/Homebrew Warning: Detected a framework Python that does not have 64-bit support in

我在运行时出错

$brew安装postgresql

==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2
File already downloaded in /Users/neil/Library/Caches/Homebrew
Warning: Detected a framework Python that does not have 64-bit support in:
/Library/Frameworks/Python.framework/Versions/Current/Python

e configure script seems to prefer this version of Python over any others,
 you may experience linker problems as described in:
http://osdir.com/ml/pgsql-general/2009-09/msg00160.html

 fix this issue, you may need to either delete the version of Python
own above, or move it out of the way before brewing PostgreSQL.

te that a framework Python in /Library/Frameworks/Python.framework is
e "MacPython" version, and not the system-provided version which is in:
/System/Library/Frameworks/Python.framework
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/shar
^C

这里是python所在的位置

$which python

/usr/local/bin/python


我修改了我的~/.zshrc路径

export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin


尽管我得到了python的64位错误,但我的python版本是64位的,因此:

$python-c'导入结构;打印(8*struct.calcsize(“P”))'


64

此命令用于安装服务器,而不是python绑定。这就是你想要的吗?有一个服务器将为您安装服务器


完成此操作后,可以安装psycopg2绑定。

中指出的问题是配置步骤不受此处路径的影响。有一个完整的其他机制,用来发现事物之间的联系;请参阅快速介绍。您可以尝试brew脚本提供的建议解决方法——将/Library/Frameworks/Python.framework/Versions/Current/Python重命名为其他名称,以使其脱离链接器的搜索路径,重复brew安装,然后将其放回。

如果您的PostgreSQL中不需要Python绑定,您也可以使用
brew安装postgresql在没有Python绑定的情况下安装它——没有Python

建议使用homebrew使用postgresql进行本地Rails开发。我不明白为什么要安装python绑定。在安装程序或服务器时,Homebrew默认包括python、ruby和其他语言绑定,而不是作为单独的包提供它们。因此,“postgresql”包包括服务器、客户端和语言绑定。
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin