加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

安装cx_oracle for python

发布时间:2020-12-12 14:08:22 所属栏目:百科 来源:网络整理
导读:在Debian 5,我一直在试图安装cx_oracle模块为python没有任何成功。首先,我安装了oracle-xe-client及其依赖(在下面的链接 here中教程)。 然后,我使用/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin中的脚本来填充环境变量,例如PATH,ORACLE_HO
在Debian 5,我一直在试图安装cx_oracle模块为python没有任何成功。首先,我安装了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

任何想法,我错过了这里?

我建议你抓住rpm文件,并安装他们与外星人。这样,以后可以运行apt-get purge不再需要。

In my case,唯一需要的env变量是LD_LIBRARY_PATH,所以我做了:

echo export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib >> ~/.bashrc
source ~/.bashrc

我想在你的情况下,路径变量将是/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读