Traceback (most recent call last):
File "/ghca/monitor/async_Msg_MQDis/run.py", line 2, in <module>
import async_Msg_MQDis
File "/ghca/monitor/async_Msg_MQDis/async_Msg_MQDis.py", line 1, in <module>
import cx_Oracle
ImportError: No module named cx_Oracle
[oracle@radius1 async_Msg_MQDis]$ rpm -ql cx_Oracle-5.1.2-1|less
/usr/lib64/python2.4/site-packages/cx_Oracle.so
/usr/share/doc/cx_Oracle-5.1.2
[oracle@radius1 site-packages]$ python
Python 2.5.2 (r252:60911, Apr 11 2013, 14:10:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: ./cx_Oracle.so: undefined symbol: PyUnicodeUCS4_Decode
>>>
3、猜测可能是python版本与cx_Oracle对应版本不一致导入
[oracle@radius1 ~]$ ls /usr/bin/python2.4
/usr/bin/python2.4
[oracle@radius1 ~]$ /usr/bin/python2.4
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>>