@@ -7,24 +7,74 @@ cx_Oracle 6 Installation
7
7
Overview
8
8
========
9
9
10
- Before cx_Oracle can be installed, an installation of
11
- `Python <https://www.python.org/downloads >`__ is needed first. Python 2.7 and
12
- Python 3.4 and higher are supported.
10
+ To connect Python and Oracle Database you need:
13
11
14
- The simplest method of installing cx_Oracle is to `Install Using Pip `_. You
15
- can also `Install Using GitHub `_. If you run into trouble, check out the
16
- section on `Troubleshooting `_. cx_Oracle uses `ODPI-C
17
- <https://github.com/oracle/odpi> `__, which means that the `ODPI-C installation
18
- instructions <https://oracle.github.io/odpi/doc/installation.html> `__ can be
19
- useful to review.
12
+ - Python 2.7 or 3.4 and higher.
20
13
21
- After cx_Oracle has been installed, you must also `Install Oracle Client `_, if
22
- that has not been done already. Oracle Client versions 12.2, 12.1 and 11.2
23
- are supported.
14
+ - The cx_Oracle module, which is available on `PyPI
15
+ <https://pypi.python.org/pypi/cx_Oracle> `__.
24
16
25
- Finally, you need an `Oracle Database `_ for Python to connect to. Oracle's
26
- standard client-server version interoperability allows cx_Oracle to connect to
27
- both older and newer databases. Python can be local or remote to the database.
17
+ - Oracle client libraries. These can be from the free `Oracle Instant
18
+ Client
19
+ <http://www.oracle.com/technetwork/database/features/instant-client/
20
+ index.html> `__, or those included in Oracle Database if Python is on
21
+ the same machine as the database. Oracle client libraries versions
22
+ 12.2, 12.1 and 11.2 are supported on Linux, Windows and macOS.
23
+ Users have also reported success with other platforms.
24
+
25
+ - An Oracle Database. Oracle's standard client-server version
26
+ interoperability allows cx_Oracle to connect to both older and newer
27
+ databases.
28
+
29
+ Quick Start cx_Oracle Installation
30
+ ==================================
31
+
32
+ - An installation of `Python <https://www.python.org/downloads >`__ is
33
+ needed. Python 2.7 and Python 3.4 and higher are supported.
34
+
35
+ - Install cx_Oracle from `PyPI
36
+ <https://pypi.python.org/pypi/cx_Oracle> `__ with:
37
+
38
+ python -m pip install cx_Oracle --upgrade
39
+
40
+ If a binary wheel package is not available for your platform, the
41
+ source package will be downloaded, compiled, and the resulting
42
+ binary installed.
43
+
44
+ - Add Oracle 12.2, 12.1 or 11.2 client libraries to your operating
45
+ system library search path such as ``PATH `` on Windows or
46
+ ``LD_LIBRARY_PATH `` on Linux. On macOS move the files to ``~/lib ``
47
+ or ``/usr/local/lib ``.
48
+
49
+ - If your database is remote, then download and unzip the client
50
+ libraries from the free `Oracle Instant Client
51
+ <http://www.oracle.com/technetwork/database/features/instant-client/
52
+ index.html> `__ "Basic" or "Basic Light" package for your
53
+ operating system architecture.
54
+
55
+ Instant Client on Windows requires an appropriate `Microsoft
56
+ Windows Redistributables
57
+ <https://oracle.github.io/odpi/doc/installation.html#windows> `__.
58
+ On Linux, the ``libaio `` (sometimes called ``libaio1 ``) package
59
+ is needed.
60
+
61
+ - Alternatively use the client libraries already available in a
62
+ locally installed database such as the free `Oracle XE
63
+ <http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html> `__
64
+ release.
65
+
66
+ Version 12.2 client libraries can connect to Oracle Database 11.2 or
67
+ greater. Version 12.1 client libraries can connect to Oracle Database
68
+ 10.2 or greater. Version 11.2 client libraries can connect to Oracle
69
+ Database 9.2 or greater.
70
+
71
+ If you run into trouble, check out the section on `Troubleshooting `_.
72
+
73
+ The database abstraction layer in cx_Oracle is `ODPI-C
74
+ <https://github.com/oracle/odpi> `__, which means that the `ODPI-C
75
+ installation instructions
76
+ <https://oracle.github.io/odpi/doc/installation.html> `__ can be useful
77
+ to review.
28
78
29
79
30
80
Upgrading from cx_Oracle 5
@@ -130,13 +180,16 @@ on configuration.
130
180
Oracle Database
131
181
===============
132
182
133
- Oracle Client libraries allow connection to older and newer databases.
183
+ Oracle's standard client-server network interoperability allows
184
+ connections between different versions of Oracle Client and Oracle
185
+ Database. For certified configurations see Oracle Support's `Doc ID
186
+ 207303.1 <https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1> `__.
134
187
In summary, Oracle Client 12.2 can connect to Oracle Database 11.2 or
135
188
greater. Oracle Client 12.1 can connect to Oracle Database 10.2 or
136
189
greater. Oracle Client 11.2 can connect to Oracle Database 9.2 or
137
- greater. For additional information on which Oracle Database releases
138
- are supported by which Oracle client versions, please see ` Doc ID 207303.1
139
- <https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1> `__ .
190
+ greater. The technical restrictions on creating connections may be more
191
+ flexible. For example Oracle Client 12.2 can successfully connect to Oracle
192
+ Database 10.2 .
140
193
141
194
Since a single cx_Oracle binary can use multiple client versions and access
142
195
multiple database versions, it is important your application is tested in your
@@ -166,6 +219,18 @@ errors. These include:
166
219
- when attempting to get array DML row counts with Oracle Client
167
220
11.2 you will get the error "DPI-1013: not supported"
168
221
222
+
223
+ Installing cx_Oracle 5.3
224
+ ========================
225
+
226
+ If you require cx_Oracle 5.3, download a Windows installer from `PyPI
227
+ <https://pypi.python.org/pypi/cx_Oracle> `__ or use ``python -m pip
228
+ install cx-oracle==5.3 `` to install from source.
229
+
230
+ Very old versions of cx_Oracle can be found in the files section at
231
+ `SourceForce <https://sourceforge.net/projects/cx-oracle/files/ >`__.
232
+
233
+
169
234
Troubleshooting
170
235
===============
171
236
0 commit comments