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