The operating system is 64 bit Python and 32 bit Oracle client. For other reasons, the Oracle client cannot be changed to 64 bit, resulting in Cx_Oracle64 bit cannot be used, CX_Oracle32 bit cannot be installed.
Under Windows environment, if 64 bit Python is installed, CX_Oracle is used, the 64 bit Oracle client is called by default. In this case, we can only install Cx_Oracle win_Amd 64-bit version.
1. First install CX_Oracle matching the current Python version, my is Python 3.8. The installed version is: Cx_Oracle-8.3.0-cp38-cp38-win_amd64.whl
2. Download the relevant Oracle instantclient (instant client) and unzip it to a folder convenient for calling
Download address: https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
The version I downloaded is: instantclient-basiclite-windows-x64-22.214.171.124.0dbru.Zip, you can try several times, there is always one for you
3. Unzip the instantclient and change the environment variable in the Python code to adjust the Oracle driver location.
My unzipped address is:
The code adjustment method is
os.environ[‘path’] = r’E:\software\Python\instantclient-basiclite-windows.x64-126.96.36.199.0dbru\instantclient_19_13′
Now CX_Oracle can call normally
- [Solved] python Connect Oracle Error: DPI-1047
- [Solved] Navicat Connect Oracle :Cannot load OCI DLL, 126
- Navicat even Oracle reports an error [no matching authentication protocol]
- sqlplus: error while loading shared libraries: lib
- Exception: java.security.InvalidKeyException: Illegal key size [How to Solve]
- Caused by: java.lang.SecurityException: Jurisdiction policy files are not signed by trusted sign…
- MYSQL Developer Error:Unable to find a Java Virtual Machine
- SQL Developer:Unable to find a Java Virtual Machine [Solved]
- modulenotfounderror: no module named ‘cv2’ [How to Solve]
- ImportError: No module named ‘requests’