Install Oracle (cx_Oracle) module for Python
来源:互联网 发布:74177网络电视直播 编辑:程序博客网 时间:2024/05/22 08:07
Oracle Database connector module for Python
I came across several (CodingNaked WebSite & Pedro Emanuel de Castro Faria Blog ) howTo's on the internet explaining how to compile and install previous versions of this connector. I decided to write my own howTo describing the latest version of the module (as of writing cx_Oracle 5.0).
(I am assuming you have the Xcode developers tools already installed since you will need the GCC compiler)
You need the follwing software:
Oracle Instant Client
cx_Oracle Module 5.0
Download the following packages from the Oracle Instant client site:
Instant Client Package - Basic
Instant Client Package - SQL*Plus
Instant Client Package - SDK
Extact all of these, then place their contents into a single directory
In my case I created a director called /opt/oracle/instantclient_10_2, and place all of the contents from all three archives in this directory.
Then run the following commands (assuming you created the same directory)
cd /opt/oracle/instantclient_10_2
ln -s libclntsh.dylib.
10.1
libclntsh.dylib
Now you need to edit you profile:
sudo nano -w /etc/profile
Copy and paste the below (Please note the paths and adjust accordingly)
ORACLE_HOME=
"/opt/oracle"
export ORACLE_HOME
DYLD_LIBRARY_PATH=
"$ORACLE_HOME/instantclient_10_2"
export DYLD_LIBRARY_PATH
SQLPATH=
"$ORACLE_HOME/instantclient_10_2"
export SQLPATH
export PATH=
"$PATH:$ORACLE_HOME/instantclient_10_2"
now run the following commands (you need to do this or the build will fail).
cd /opt/oracle/
ln -s libclntsh.dylib.
10.1
libclntsh.dylib
I extracted the cx_Oracle module to /opt/oracle/cx_Oracle-5.0. All you have to do now is run these commands at the module will be built and installed.
cd /opt/oracle/cx_Oracle-
5.0
sudo python setup.py build
sudo python setup.py install
- Install Oracle (cx_Oracle) module for Python
- ubuntu python install oracle module cx_Oracle
- Python cx_Oracle & Oracle Client for Mac OS
- Oracle client 12.1.0.2 for MacOS[Python:cx_Oracle]
- install Oracle and cx_oracle on Mac
- cx_Oracle Module
- python之oracle连接 cx_Oracle
- Python module “cx_Oracle” module could not be found
- python-multiprocessing module install
- mac python install module
- 【python】 python 连接oracle数据库 cx_Oracle插件
- Python cx_Oracle - import not a valid win32 app or ImportError: No module named cx_Oracle Found
- python 通过cx_Oracle操作oracle database
- python 连接 Oracle 乱码问题(cx_Oracle)
- python通过cx_Oracle连接oracle设置
- python 连接oracle 报错 cx_Oracle.DatabaseErro
- python使用cx_oracle连接oracle数据库
- python用cx_oracle连接oracle报错
- 备份失败的六大原因
- awk教程
- 这十月,与C++代码相伴的日子
- mfc 小技巧之 获取对话框句柄 对话框指针
- 【分词】正向最大匹配中文分词算法
- Install Oracle (cx_Oracle) module for Python
- 使用Derby ij客户端工具
- 判断是2G网络还是3G网络
- Timer的封装类,包含定时器ID和对应的类this指针
- Mysql 语句优化
- 在windows server2008中安装arcgis server时,IIS需要注意的问题
- CFileDialog::DoModal()在xp下打不开的问题
- 模板方法模式
- 登录arcgis server的用户和用户名问题