Python 3.5.3 and Oracle 11.2 on Windows 7: cannot locate oracle include files
You will need to install dependencies from Oracle.
Download Installer from here
Add
ORACLE_HOME
as Windows environment variable and set the path of the unzipped folder e.g.C:\....\Download\instantclient_12_1
as its value. Click here in case you don't know how to add environment variable.Append this same path to the environment variable
Path
pip install cx_oracle
Reboot your computer and start using cx_oracle!
cx_Oracle does not recognize location of Oracle software installation for installation on Linux
Updated
As Petriborg suggested, setting LD_RUN_PATH
at build time will include the path to the Oracle shared library files in the cx_Oracle
shared library that is built during installation. This obviates the need for LD_LIBRARY_PATH
as I suggested in my first answer.
For the RPMs that you are using, ORACLE_HOME
should be set to /usr/lib/oracle/12.1/client
. If you are using pip
:
$ export ORACLE_HOME=/usr/lib/oracle/12.1/client
$ export LD_RUN_PATH=/usr/lib/oracle/12.1/client/lib:$LD_RUN_PATH
$ pip install cx_Oracle
$ python -c 'import cx_Oracle; print(cx_Oracle.version)'
5.1.3
Read this documentation for some info on installing and executing applications that use the client libraries.
error: cannot locate an Oracle software installation When trying to install cx_Oracle
Don't use easy_install or pip, they don't really work very well for installing cx_Oracle since there are a number of environmental dependencies that the install scripts don't set up automatically. You need to get an oracle client driver, the quickest of which to find is the instantclient. Then point your ORACLE_HOME and PATH at the install location for the drivers, and install cx_Oracle itself. You should be good to go after that.
see: easy_install cx_Oracle (python package) on Windows
The question is about windows, but the answer includes info on *nix.
cx_Oracle not installing on Oracle Linux
This tutorial worked like a charm and saved my life: http://ubuntugeeknerd.blogspot.com/2013/08/how-to-install-oxoracle-in-rhel-64-bit.html
Related Topics
What Is The Maximum Allowed Depth of Sub-Folders
In Linux, How to Find Find Directory with The Most Subdirectories or Files
Checking Shared Libraries for Non Default Loaders
How to Set Control Register 0 (Cr0) Bits in X86-64 Using Gcc Assembly on Linux
Any Good Guides on Using Ptrace_Sysemu
Vagrant Ssh -C and Keeping a Background Process Running After Connection Closed
In Linux, Physical Memory Pages Belong to The Kernel Data Segment Are Swappable or Not
How to Provide Extend-On-Write Functionality for Memory Mapped Files in Linux
How to Send Esc/Pos Commands to Thermal Printer in Linux
Linux of Equivalent Cryptprotectmemory
Execute a Script After Every Git Push
Killing Process in Shell Script
How to Specify Which Version of Perl to Use on Centos
How Is a Memory Barrier in Linux Kernel Is Used