step 1 : install oracle client library

url: http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

or search:  instant clients download for Linux x86

download:    instantclient-basic-linux-version.zip   # choose your version !!!!

instantclient-sdk-linux-version.zip     # header files to compile cx_Oracle

unzip them to one directory (./libclntsh.so ./include ./admin .....)

step 2: config enviroment variables

export ORACLE_HOME=/path/to/instantclient   # must

config LD_LIBRARY_PATH ( i used it but failed, so i edit file /etc/ld.so.conf)

after edit ld.so.conf file, you need run ldconfig (as root)

step 3: install cx_Oracle

prepare: Python.h

yum install python-devel or  apt-get install python-dev

cause "/usr/bin/ld: cannot find -lclntsh", you need do this

cd $ORACLE_HOME

ln -s libclntsh.so.version libclntsh.so # repalce version to right num

now you can do this:

pip install cx_Oracle

Use Binary Way ( like windows ):

Files: https://pypi.python.org/pypi/cx_Oracle  http://sourceforge.net/projects/cx-oracle/

Test:

import cx_Oracle

cx_Oracle.connect('username','password','host/service_name',cx_Oracle.SYSDBA)

  

Good Luck

install cx_Oracle on Linux的更多相关文章

  1. centos安装安全狗提示Need system command 'locate' to install safedog for linux的解决方法

    今天为客户的centos服务器安装安全狗时提示Need system command 'locate' to install safedog for linux.Installation aborte ...

  2. 使用autotools工具用configure、make、make install编译安装linux工程的详细步骤

    使用autotools工具用configure.make.make install编译安装linux工程的详细步骤 转载tmxkwzy 最后发布于2016-11-24 10:20:15 阅读数 324 ...

  3. install sublime for linux

    Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators Python API, that available f ...

  4. 转 How to install XenServer Tools – Linux(forward)

    本文转自: http://blog.csdn.net/zhongguoren666/article/details/7088798 比较懒....大家看图说话就行了.... 说句实在话…还是老外写的地 ...

  5. How to install GSL on linux(ubuntu,centos,redhat)

    Test: ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz  success. ftp://ftp.gnu.org/gnu/gsl/gsl-1.13.0.tar.g ...

  6. ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1

    博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...

  7. 02. Install redis on Linux

    安装下载redis,参考官方文档:https://redis.io/download 下载: shell>wget http://download.redis.io/releases/redis ...

  8. python使用cx_Oracle在Linux和Windows下的一点差异

    1. 主要是线程方面的差异. Windows下,把cx_Oracle.connect(connectedId)得到的handle传给定时器线程,主线程和和定时器可以用同一个handle. 但Linux ...

  9. Install Mono on Linux

    Debian, Ubuntu, and derivatives Add the Mono Project GPG signing key and the package repository to y ...

随机推荐

  1. 在linux中使用cmake编译运行cocos2d-x 3.4 projects

    原因: 由于不想在真机环境和 ide中调试环境, 只想在linux端进行 调试和运行, 需要使用cmake对现有的游戏进行编译(cocos2dx-lua 3.4) 修改步骤: 1.修改framewor ...

  2. iOS开发之直接使用UISearchBar

    iOS开发中经常需要使用SearchBar,我们可以选择使用UISearchBar+UISearchController或者UISearchBar+UISearchDisplayController( ...

  3. MyEclipse黑色主题

    第一步:打开链接http://www.eclipsecolorthemes.org/选中一款:下载其中的epf格式. 如图: 在eclipse中打开:file > import > Gen ...

  4. Java注释

    注释:用于注解说明解释程序的文字.提高了代码的阅读性. 一:单行注释 "//注释文字" 二:多行注释 "/*注释文字*/" 三:文档格式 "/**注释 ...

  5. algorithm 学习之 for_each

    对于algorithm里面的函数使用不算多,但是用过之后才发现,之前写过很多多余的代码,所以打算系统的学习使用下algorithm里的东西,首先就是for_each. 先看下for_each的定义: ...

  6. [leetcode]Binary Tree Maximum Path Sum

    Binary Tree Maximum Path Sum Given a binary tree, find the maximum path sum. The path may start and ...

  7. C语言结构体位域

    demo: typedef struct { int a:2; int b:2; int c:1; }test; int main() { test t; t.a=1; t.b=3; t.c=1; / ...

  8. tiny java web server

    import java.io.*; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; ...

  9. MVC学习网站

    http://www.cnblogs.com/artech/archive/2012/04/10/how-mvc-works.html

  10. 10天学会phpWeChat——第七天:创建一个自适应PC网站+H5移动端的模块

    本教程基于phpWeChat核心框架1.1.0+版本.下载地址:http://s.phpwechat.com/app_38026ed22fc1a91d92b5d2ef93540f20 通过前面六讲的系 ...