首页 > 技术文章 > django 连接 oracle 问题

ostrich-sunshine 2018-08-09 11:31 原文

     安装 oracle 后,在 django 项目中连接出现问题记录。

问题1:pip install cx_Oacle 未出现任何问题,但运行过程出现:

    

   原因:连接 oracle 的工具 cx_Oracle 安装不正确或未安装

   解决:自己下载安装与自己系统匹配的 whl 文件进行安装,如我的是 python 3.6 +系统 win(64),因此对应版本是:cx_Oracle-6.4.1-cp36-cp36m-win_amd64.whl 

          下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_oracle

           安装: pip install cx_Oracle-6.4.1-cp36-cp36m-win_amd64.whl  

 

问题2:pip install/uninstall cx_Oracle 操作不成功,出现问题如下

   

提示:cx_Oracle_******.pyd 文件限制访问
解决:删除该文件,再重新安装即可

PS:cx_Oracle 最好下载 对应whl文件,再自行安装较好。

 

推荐阅读