【发布时间】:2011-05-17 11:42:31
【问题描述】:
在 Debian 5 上,我一直在尝试为 python 安装 cx_oracle 模块,但没有成功。首先,我安装了 oracle-xe-client 及其依赖项(遵循以下链接中的教程here)。
然后,我使用 /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin 中的脚本来填充环境变量,例如 PATH、ORACLE_HOME 和 NLS_LANG .
一旦完成,我尝试运行:
sudo easy_install cx_oracle
但我不断收到以下错误:
Searching for cx-oracle
Reading http://pypi.python.org/simple/cx_oracle/
Reading http://cx-oracle.sourceforge.net
Reading http://starship.python.net/crew/atuining
Best match: cx-Oracle 5.0.4
Downloading http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-5.0.4.tar.gz?download
Processing cx_Oracle-5.0.4.tar.gz
Running cx_Oracle-5.0.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xsylvG/cx_Oracle-5.0.4/egg-dist-tmp-8KoqIx
error: cannot locate an Oracle software installation
知道我在这里错过了什么吗?
【问题讨论】:
-
echo $ORACLE_HOME输出什么? -
$ORACLE_HOME 设置为 /usr/lib/oracle/xe/app/oracle/product/10.2.0/client
-
如有疑问,请阅读官方cx_Oracle Installation instructions,其中包含的信息比本文中的许多答案都更新。