Unable to get cx_Oracle to work with Python version 2.7 / mac os 10.7.2 (Lion)
One more thing: I installed oracle 32 bit, not sure if this was correct.
Traceback (most recent call last): File "reader.py", line 9, in <module> import cx_Oracle File "build/bdist.macosx-10.7-intel/egg/cx_Oracle.py", line 7, in <module> File "build/bdist.macosx-10.7-intel/egg/cx_Oracle.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/me/.python-eggs/cx_Oracle-5.1.1-py2.7-macosx-10.7-intel.egg-tmp/cx_Oracle.so, 2): Symbol not found: _OCIAttrGet Referenced from: /Users/me/.python-eggs/cx_Oracle-5.1.1-py2.7-macosx-10.7-intel.egg-tmp/cx_Oracle.so Expected in: flat namespace in /Users/me/.python-eggs/cx_Oracle-5.1.1-py2.7-macosx-10.7-intel.egg-tmp/cx_Oracle.so
The key problem does not seem to be able to find _OCIAttGet , and I think it means that it cannot find the lib file or something like that.
Found on the Internet, someone is talking about DYLD_LIBRARY_PATH , but mine is installed, however he mentioned it in the cxoracle.cfg file that I cannot find, is this my problem?
EDIT
After trying to run it using 32-bit python mode, I see another error.
Traceback (most recent call last): File "reader.py", line 9, in <module> import cx_Oracle File "build/bdist.macosx-10.7-intel/egg/cx_Oracle.py", line 7, in <module> File "build/bdist.macosx-10.7-intel/egg/cx_Oracle.py", line 3, in __bootstrap__ ImportError: No module named pkg_resources
- I was unable to run 64-bit versions of oracle to work on my computer, continued to receive segmentation errors when I started sqlplus, so therefore I use 32.
SECOND EDIT
Actually, no matter what I install, this is not the correct version .. 32-bit version
ld: warning: ignoring file /opt/oracle/instantclient10_2/libclntsh.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
64-bit version:
ld: warning: ignoring file /opt/oracle/instantclient10_2/libclntsh.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
I am going to try 11g, but this only has a 64bit version.