当前位置: 首页 > linux, 数据库 > 正文

python cx-Oracle 驱动安装

安装oracle驱动

cx-Oracle驱动二进制版本下载地址
http://download.oracle.com/otn/linux/instantclient/185000/instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
## 下载时需要oracle开发者帐号

说明:本次测试的操作系统为:Ubuntu-16.04,其他操作系统可以在oracle网站上查找并下载对应版本的zip包

mkdir -p /opt/oracle
cd /opt/oracle
unzip instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
mv instantclient_18_5 /opt/oracle/
apt-get install libaio1 -y

配置:

echo /opt/oracle/instantclient_18_5 > /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig

echo “export LD_LIBRARY_PATH=/opt/oracle/instantclient_18_5:$LD_LIBRARY_PATH” >> /etc/profile.d/ora_env.sh

测试驱动连接

cat test_ora.py

驱动测试运行结果

python test_ora.py

参考文档

https://cx-oracle.readthedocs.io/en/latest/installation.html#installing-cx-oracle-on-linux

https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

本文固定链接: https://www.sudops.com/python-cx-oracle-driver-install.html | 运维·速度

该日志由 Fisher 于2019年06月06日发表在 linux, 数据库 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: python cx-Oracle 驱动安装 | 运维·速度
关键字: ,

python cx-Oracle 驱动安装:等您坐沙发呢!

发表评论


Time limit is exhausted. Please reload the CAPTCHA.

快捷键:Ctrl+Enter