[cx-oracle-users] This must be something simple....
Brought to you by:
atuining
From: Dwayne K. <dw...@kr...> - 2012-09-10 15:35:12
|
OK, I KNOW I'm missing something simple here. Please point out the simple thing that I'm missing. I've been setting up a system and I have Oracle installed and running, and upgraded Python to 3.2 However whenever I try to install and use cx_Oracle it can't seem to find the package. At first I thought it might have been something related to my distrib (CentOS) so I changed to RHEL and I get exactly the same thing! So as you can see from the output below, the install of cx_Oracle was uneventful: [root@dblinux uploads]# rpm -Uvh cx_Oracle-5.1.1-11g-py32-1.x86_64.rpm Preparing... ########################################### [100%] 1:cx_Oracle ########################################### [100%] [root@dblinux /]# find . -name cx_* ./uploads/cx_Oracle-5.1.1-11g-py32-1.x86_64.rpm ./usr/share/doc/cx_Oracle-5.1.1 ./usr/lib/python3.2/site-packages/cx_Oracle.cpython-32mu.so ./usr/lib/python3.2/site-packages/cx_Oracle-5.1.1-py3.2.egg-info Oracle is installed and running: [oracle@dblinux ~]$ sqlplus system/config SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 6 16:42:42 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> You can see that I have my environment set up so that PYTHONPATH includes the folder where the cx_Oracle files were found. Also verified by printing sys.path: CODE: SELECT ALL<http://www.python-forum.org/pythonforum/viewtopic.php?f=16&t=36468#> [oracle@dblinux ~]$ env|grep PYTH PYTHONPATH=/usr/local/lib/python32.zip:/opt/Python-3.2.3/Lib:/opt/Python-3.2.3/Lib/plat-linux2:/opt/Python-3.2.3/build/lib.linux-x86_64-3.2:/usr/local/lib/python3.2/site-packages:/usr/lib/python3.2/site-packages [oracle@dblinux ~]$ python Python 3.2.3 (default, Sep 6 2012, 16:12:29) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print (sys.path) ['', '/usr/local/lib/python32.zip', '/opt/Python-3.2.3/Lib', '/opt/Python-3.2.3/Lib/plat-linux2', '/opt/Python-3.2.3/build/lib.linux-x86_64-3.2', '/usr/local/lib/python3.2/site-packages', '/usr/lib/python3.2/site-packages', '/opt/python/Lib', '/opt/python/Lib/plat-linux2', '/opt/python/build/lib.linux-x86_64-3.2'] >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named cx_Oracle Yet, for some reason it STILL can't see cx_Oracle. This is the first non-windoze box I've set cx_Oracle up on, so I'm not sure if there is something platform specific that I'm missing. I will be extremely grateful if someone can point what I'm missing. Dwayne |