Python installation cx_oracle module problems (32bit)

Source: Internet
Author: User

Environment:

Win7 32-bit system

Python3.6 (32bit)

Installation module:

Cx_oracle module Download (: https://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_oracle)

If it is downloaded on the website, it is necessary to download and the Python version corresponds . Because I used to cx_oracle-5.3+oci12c-cp36-cp36m-win_amd64.whl this file when I installed the 64-bit system, Therefore, this installation will download the corresponding 32-bit system CX_ORACLE?5.3+OCI12C?CP36?CP36M?WIN32.WHL.

Using the PIP install path installation, path is where the file is located

Oracle Client Instantclient_12_1 (: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html)

Because the cx_oracle file is downloaded cx_oracle?5.3+oci12c? CP36?CP36M?WIN32.WHL, corresponding to the 32-bit version of 12

Copy the Oci.dll Oraociei12.dll and oraocci12.dll three files from the downloaded instantclient-basic-nt-12.1.0.2.0 file to the Python installation path (for example, my own D:\soft\ Python36\lib\site-packages).

Problem

Run in Idle

1 Import cx_oracle

Error:importerror:dll load failed: The specified module could not be found

This problem occurs because there is no copy of the Oci.dll file mentioned earlier or the Oracle client version is inconsistent with the cx_oracle version

And I have copied the Oci.dll file. And the file name is judged to be the same version.

I tested all 12 versions of the Oracle client, including 64-bit, without success. (Error when testing 64-bit:importerror: DLL load failed:%1 is not a valid WIN32 application , which means the operating system, CX_ Oracle and Instantclient are different in number of bits, but there was no other way to try.

Then I realized that maybe it was the cx_oracle problem ...

Solutions

Run in cmd

Pip Install-u cx_oracle

Update the Cx_oracle module to the latest version, problem solving.

Python installation cx_oracle module problems (32bit)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.