linux下 python2.6连接oracle数据库

1.首先 pip install cx_Oracle()安装之后进行连接,结果出现( DatabaseError: (cx_Oracle.DatabaseError) DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help)问题,解决办法参见第二步。
2. 设置环境变量
#echo /usr/lib/oracle/11.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf
#ldconfig

你可能感兴趣的:(python,linux)