问题描述
I have installed PostgreSQL 9.0.4 on Mac OSX 10.6 using the installer from EnterpriseDB and noticed that stored procedures implemented in plpython use python 2.5. A look into the plpython library seems to confirm that (otool sort of does on the mac what ldd does on linux):
host:~ user$ otool -L /Library/PostgreSQL/9.0/lib/postgresql/plpython2.so
/Library/PostgreSQL/9.0/lib/postgresql/plpython2.so:
/System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
host:~ user$ otool -L /Library/PostgreSQL/9.0/lib/postgresql/plpython2.so
/Library/PostgreSQL/9.0/lib/postgresql/plpython2.so:
/System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
如何将其从Python 2.5更改为Python 2.6?
how can I change that from Python 2.5 to Python 2.6 ?
亲切的问候
ssc
推荐答案
您需要从源代码进行重建.无法以二进制发行版对其进行更改.
You need to rebuild from source. There is no way to change it in a binary distribution.
运行configure
时,将环境变量PYTHON
设置为要使用的python
二进制文件的完整路径,例如
When you run configure
, set the environment variable PYTHON
to the complete path of the python
binary that you want to use, e.g.,
./configure --other-stuff ... PYTHON=/usr/bin/python2.6
我想,您可以尝试让EnterpriseDB人员来更新他们的构建例程.不知道他们选择什么标准来选择Python版本.或者,也许从MacPorts安装.
You could try to bug the EnterpriseDB people to update their build routines, I guess. Not sure by what criteria they choose the Python version. Alternatively, perhaps install from MacPorts.
这篇关于如何在Mac OSX上更改plpython使用的Python版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!