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  下载客户端
cx_Oracle连接数据库时报错: cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library

 

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

 

 

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

 

 

3、下载后加压到就可以

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

 

 4、配置环境变量

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

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

 

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

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

 

 

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

 

 

 

 
 

 

相关文章: