---恢复内容开始---

转自:http://blog.csdn.net/zhangweiwindow/article/details/6575224

今天重装了一下系统,所以以前工作时配置的python程序也需要重新配置一下。但是在装完cx_Oracle运行程序时出现了“ Unable to acquire Oracle environment handle”错误,百思不得其解,以前是可以配置成功的啊,但这次是怎么了。

以下是环境变量的配置(用的是 oracle的instantclient):

PATH=d:/instantclient

NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

TNS_ADMIN=d:/instantclient

以上配置按道理来说是没有问题的,可问题出在哪呢?查来查去,终于找到了问题所在:

在出现这个问题之前,还出现了一个问题:“Dll load failed”,因为当前配置环境变量没能解决此总是,所以干脆就把oci.dll文件拷到site-package目录中了,因为没有拷贝oraociei10.dll和oraocci10.dll,所以出现了“ Unable to acquire Oracle environment handle”错误。

以后此问题的解决办法:

第一种:配置好环境变量,不把oracle相关的dll文件放到site-package中

第二种:拷贝oci.dll, oraociei10.dll, oraocci10.dll到site-package中,oci.dll, oraociei10.dll, oraocci10.dll这三个文件可以从本地安装的oracle路径下D:\app\lenovo\product\11.2.0\client_1下获取到。

Unable to acquire Oracle environment handle 问题的解决的更多相关文章

  1. Error when launching Quest Central for DB2: "QCC10000E - Unable to allocate environment handle fo

    标题 Error when launching Quest Central for DB2: "QCC10000E - Unable to allocate environment hand ...

  2. MySQL案例03:(MyCAT报错) [ERROR][$_NIOREACTOR-3-RW] caught err: java.lang.OutOfM emoryError: Unable to acquire 131072 bytes of memory, got 0

    上班坐下来没多久,接同事电话说有两台mysql服务器无法访问,其中这两台服务器是mycat服务器+MySQL服务器,具体处理过程如下: 一.错误信息 错误信息01: :: ::, [INFO ][$_ ...

  3. myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

    把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...

  4. Oracle客户端工具出现“Cannot access NLS data files or invalid environment specified”错误的解决办法

    Oracle客户端工具出现"Cannot access NLS data files or invalid environment specified"错误的解决办法 方法一:参考 ...

  5. linux安装phpstorm出现 Startup Error: Unable to detect graphics environment

    在centos6.2下在安装phpstorm下遇到 Startup Error: Unable to detect graphics environment 其中jdk安装的版本是 1.7.0_79  ...

  6. [oracle] ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener

    安装好Oracle数据库后: 执行 dbstart和dbshut会提示: [oracle@oracle11g ~]$ dbstartORACLE_HOME_LISTNER is not SET, un ...

  7. MyEclipse启动时报 Unable to acquire application service. Ensure that the org.eclips

    今天MyEclipse启动时报如下错误: !SESSION 2012-02-12 11:32:55.198 ---------------------------------------------- ...

  8. Unable to determine the device handle for GPU 0000:01:00.0: GPU is lost.问题排坑

    在运行maskrcnn时,会碰到训练不动的问题,就卡在这儿 UserWarning: Converting sparse IndexedSlices to a dense Tensor of unkn ...

  9. 解决Ubuntu中Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another proce...

    解决Ubuntu中Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another proce... ...

随机推荐

  1. 每秒处理3百万请求的Web集群搭建-为最佳性能调优 Nginx

    这篇文章是<打造3百万次请求/秒的高性能服务器集群>系列的第2部分,在这个部分中你可以使用任何一种 WEB 服务器,不过我决定使用 Nginx,因其轻量级.高可靠及高性能的优点. 通常来说 ...

  2. JAVA中的字节流与字符流

    字节流与字符流的区别? 字节流与和字符流的使用非常相似,两者除了操作代码上的不同之外,是否还有其他的不同呢? 实际上字节流在操作时本身不会用到缓冲区(内存),是文件本身直接操作的,而字符流在操作时使用 ...

  3. 关于分部视图(Partial View)

    一.关于分部视图(Partial View) Partial View是可以应用在View中的,编写一次,在其他View中可以被反复使用.通常都是放在"Views——Shared" ...

  4. 构建SqlSessionFactory 的过程

    1 SqlSessionFactory 的核心功能是创建 SqlSession 接口,而 SqlSessionFactory 是通过 SqlSessionFactoryBuilder 去构建. 构建步 ...

  5. Mongodb与mysql语法比较

    Mongodb与mysql语法比较   mongodb与mysql命令对比 传统的关系数据库一般由数据库(database).表(table).记录(record)三个层次概念组成,MongoDB是由 ...

  6. uint64, sizet_t, ssizet_t

    uint64 在32位平台 typedef unsigned long long int uint64_t;在64位平台 typedef unsigned long int uint64_t;不同的t ...

  7. swift 运算符和控制流程

    闭区间运算符 闭区间运算符(a...b)定义一个包含从a到b(包括a和b)的所有值的区间,只能是数字 for index in 1...5 { println("\(index) * 5 = ...

  8. 由于link顺序错误导致的undefined reference

    其实我之前就遇到过这个问题,也强调过,GNU-G++在link阶段是依赖输入的.o或者.a文件的顺序的.如果顺序错误会导致undefined reference错误 见这篇随笔:http://www. ...

  9. Python 切片那些事

  10. swift侧开菜单

    此文来自学习这篇博客后的学习笔记,原博客是用oc写的,我最近在学swift,于是改写为swift. swift和oc之间互相调用还是很方便的,但是要注意AnyObject和optional的运用,我现 ...