1. Need to download two packages from Oracle website
Instantclient-basic-linux.x64-11.2.0.4.0.zip
Instantclient-sdk-linux.x64-11.2.0.4.0.zip
2. Download and extract to a directory, such as:/oracle
3. Configure according to the BUILD.txt steps after decompression:
3.1
Cat. Bash_profile # bash_profile# Get the aliases andfunctionsif [- F ~/.BASHRC]; Then. ~/. bashrcfi#UserSpecific environment andStartup Programsoracle_home=/Oracle/Instantclient_11_2path=$PATH: $HOME/bin: $ORACLE _homeld_library_path=$LD _library_path: $ORACLE _home: $ORACLE _home/sdkexport ld_library_pathexport PATH
Configure Bash_profile
3.2
Python setup.py Build
Python setup.py Install
3.3 If the following error occurs, you will need to install python-devel-2.6.6-64.el6.x86_64
CX_ORACLE.C:6: -: Error:python.h:no Suchfile ordirectorycx_oracle.c:7: A: Error:datetime. H:no suchfile ordirectorycx_oracle.c:8: -: Error:structmember.h:no Suchfile orDirectoryinch fileIncluded fromCX_ORACLE.C:142: buffer.c: -: error:expected specifier-Qualifier-list before ' Pyobject ' buffer.c:inch function' Cxbuffer_init ': buffer.c: -: Error: ' Udt_buffer ' has no member named ' obj ' buffer.c:inch function' cxbuffer_copy ': buffer.c: -: warning:implicit declaration of function' Py_xincref ' buffer.c: -: Error: ' Udt_buffer ' has no member named ' obj ' buffer.c: $: Error: ' Udt_buffer ' has no member named ' obj ' buffer.c: $: Error: ' Udt_buffer ' has no member named ' obj '
View Code
Cx_oracle Python Module installation