Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Two problems of Python connecting ORACLE data

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment win7 (64) + Python 2.7.5 + cx_Oracle-5.1.3-11g.win-amd64-py2.7

1. Dll is not a valid win32 application

Run the error "dll is not a valid win32 application" after import cx_Oracle

After investigation, it is found that the client of ORACLE uses 32-bit. After installing the 64-bit client, the OCI.DLL in the directory will be installed.

Just copy a copy of the large Python lib/libsite-packages directory.

2 、 InterfaceError: Unable to acquire Oracle environment handle

After searching on the Internet for a long time, most of them said that they wanted to set ORACLE_HOME, but after looking at the environment variables, they found that there was already a client in PATH.

Path ah, and then remove the OCI.DLL from the libsite-packages, resulting in OK!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report