cx_Oracle连接数据库时报错: cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library


1、https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#installing-cx-oracle-on-windows   执行更新或者安装 cx_Oracle

python -m pip install cx_Oracle
python -m pip install cx_Oracle --upgrade 

  如果需要设置代理:

python -m pip install cx_Oracle --proxy=http://proxy.example.com:80 --upgrade

2、https://www.oracle.com/database/technologies/instant-client.html  下载客户端

 

 

 

 

 

3、下载后加压到就可以

 

 4、配置环境变量

TNS_ADMIN :D:\Program Files\instantclient-basic-windows.x64-11.2.0.4.0\instantclient_11_2

 

 5、复制\instantclient_11_2 文件下的所有dll文件到python根目录下,搞定

 

 

 

 

 

 
 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM