Win7 64-bit, installation configuration cx_oracle, some problems encountered and solutions

Source: Internet
Author: User

First install the configuration, you must grasp a point, is the same version! Includes: System version, Python version, Oracle client version, cx_oracle version, then install configuration is easy!

Because my system is win7 64 bit, Python version is also 64 bit, so the download installs Oracle Client is also 64 bit 10g, corresponding cx_oracle also if 64 bit 10g, of course also pay attention to Python version python2. X or python3.x, also to the corresponding version of the

1. Oracle client:http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

Unzip the downloaded file to the path you want to put, mine is Q:\OracleClient,

Then configure the environment variables: right-click Computer--Properties--Advanced system settings--environment variables--System variables--New

Variable: Oracle_home value: Q:\OracleClient

Variable: tns_admin value: Q:\OracleClient

Edit path with '; ' Separate and add a Q:\OracleClient

2, cx_oracle can be downloaded in the PyPI, open pypi url https://pypi.python.org/pypi, search cx_oracle in the inside, find the corresponding version of the download, download completed after installation can be

3, some problems encountered, and solutions

"cx_Oracle.InterfaceError:Unable to acquire Oracle environment handle"

or "Importerror:dll load failed: The specified program could not be found "

or "Import Cx_oracle,importerror:dll load failed: The specified module could not be found"

---Workaround: Copy the Ico.dll from the extracted Oracle client to the Python installation directory, and see some people on the web to python27\lib\site-packages the solution.

"cx_oracle.databaseerror:ora-12170:tns"--The solution: Check your network, listen, Tnsname.ora.

"Cx_oracle ORA-24315: illegal attribute type"----The cause of this error is because the version is incompatible, check the environment, if the Oracle client is 10g, but the installation of the cx_oracle is for 11g will be reported this fault, download cx_ Oracle is installed for 10g

Win7 64-bit, installation configuration cx_oracle, some problems encountered and solutions

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.