码迷,mamicode.com
首页 > 数据库 > 详细

python   install cx_Oracle

时间:2014-09-10 02:57:10      阅读:666      评论:0      收藏:0      [点我收藏+]

标签:python cx_oracle

   1.安装python 

     linux 自带安装了python2.6.6

   2.安装easy_install

  按照官网说明,无法安装

[root@server3 backup]# wget https://bootstrap.pypa.io/ez_setup.py -O - | python

--2014-09-05 16:59:01--  https://bootstrap.pypa.io/ez_setup.py

正在解析主机 bootstrap.pypa.io... 103.245.222.175

正在连接 bootstrap.pypa.io|103.245.222.175|:443... 已连接。

错误: 证书通用名 “*.c.ssl.fastly.net” 与所要求的主机名 “bootstrap.pypa.io” 不符。

要以不安全的方式连接至 bootstrap.pypa.io,使用‘--no-check-certificate’。

依照提示 用 --no-check-certificate 下载ez_setup.py

[root@server3 backup]# wget https://bootstrap.pypa.io/ez_setup.py --no-check-certificate

然后 python ez_setup.py 安装


3. 安装cx_Oracle

[root@server3 backup]# easy_install cx_Oracle

Searching for cx-Oracle

Reading https://pypi.python.org/simple/cx_Oracle/

Reading http://cx-oracle.sourceforge.net

Reading http://starship.python.net/crew/atuining

Best match: cx-Oracle 5.1.3

Downloading https://pypi.python.org/packages/source/c/cx_Oracle/cx_Oracle-5.1.3.tar.gz#md5=cd6ff16559cbc9c20087ec812c7092ab

Processing cx_Oracle-5.1.3.tar.gz

Writing /tmp/easy_install-qNEdPX/cx_Oracle-5.1.3/setup.cfg

Running cx_Oracle-5.1.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-qNEdPX/cx_Oracle-5.1.3/egg-dist-tmp-7rg1rD

error: cannot locate an Oracle software installation


依照提示,设定好 oracle相关环境

export ORACLE_HOME=/oracle/oracle/product/11.2.3

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib


python   install cx_Oracle

标签:python cx_oracle

原文地址:http://chengsq.blog.51cto.com/1343418/1550176

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!