python通过cx_Oracle连接oracle设置
2014-06-10 21:37
465 查看
Python的Oracle数据库包cx_Oracle。win7x64位,cx_Oracle-5.1.2-11g.win-amd64-py2.7。
进入Python的编辑环境
>>> import cx_Oracle
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
重新下载Python 2.7.7的64位版,换掉环境变量,安装cx_Oracle-5.1.2-11g.win-amd64-py2.7,import 成功。
cx_Oracle是要调用OCI来联接Oracle数据库,11gx64 对应64python 和cx_Oracle。
Python下载 http://www.python.org/
cx_Oracle下载 http://cx-oracle.sourceforge.net/
http://sourceforge.net/projects/cx-oracle/files/5.1.2/
在环境变量中添加一个变量名字为TNS_ADMIN的变量,值为ora文件目录
cxoracle
进入Python的编辑环境
>>> import cx_Oracle
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
重新下载Python 2.7.7的64位版,换掉环境变量,安装cx_Oracle-5.1.2-11g.win-amd64-py2.7,import 成功。
cx_Oracle是要调用OCI来联接Oracle数据库,11gx64 对应64python 和cx_Oracle。
Python下载 http://www.python.org/
cx_Oracle下载 http://cx-oracle.sourceforge.net/
http://sourceforge.net/projects/cx-oracle/files/5.1.2/
在环境变量中添加一个变量名字为TNS_ADMIN的变量,值为ora文件目录
cxoracle
import cx_Oracle con = cx_Oracle.connect("duser/pswd@db") print con.version con.close()
相关文章推荐
- 解决python通过cx_Oracle模块连接Oracle乱码的问题
- python 通过cx_Oracle操作oracle database
- python 连接 Oracle 乱码问题(cx_Oracle)
- python使用cx_oracle连接oracle数据库
- Python中通过cx_oracle操作ORACLE数据库的封闭函数
- python连接oracle数据库之安装cx_Oracle
- Python中通过cx_Oracle访问数据库遇到的问题总结
- python 连接 Oracle 乱码问题(cx_Oracle)
- Python(Pycharm)连接Oracle数据库之cx_Oracle的使用(cx_Oracle在pyCharm中报错)
- 【Python Oracle】使用cx_Oracle 连接oracle的简单介绍
- python cx_oracle 变量形式连接数据库
- 【Python Oracle】使用cx_Oracle 连接oracle的介绍
- 在Python中分别通过pypyodbc和cx_Oracle来访问数据库
- 多个版本的Python同时连接Oracle和安装cx_Oracle问题解决
- python之oracle连接 cx_Oracle
- python 连接 Oracle 乱码问题(cx_Oracle)
- Python使用cx_Oracle模块连接操作Oracle数据库
- python连接oracle的模块cx_Oracle安装和配置
- python cx_Oracle的基础使用方法(连接和增删改查)
- Windows下python连接、操作oracle数据库(cx_Oracle)