简体   繁体   中英

easy installed cx_Oracle but still can't find module

On Mac OS X 10.8.5 Downloaded the client software, added it to my bash profile, now ran:

easy_install cx_Oracle
Searching for cx-Oracle
Reading http://pypi.python.org/simple/cx_Oracle/
Reading http://cx-oracle.sourceforge.net
Reading http://starship.python.net/crew/atuining
Best match: cx-Oracle 5.1.2
Downloading http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-5.1.2.tar.gz?download
error: None

Then I went to test my script which is:

import cx_Oracle
con = cx_Oracle.connect('user/pwd@mydatabase/orcl')
print con.version
con.close()

Ran it and got hit by

Traceback (most recent call last):
File "sqlTest.py", line 1, in <module>
import cx_Oracle

Any thoughts?

You must download and install Oracle instantclient libs (including -dev). Which is not as easy because on MAC OSX as they were segfaulting any app for several years. Functional MAC OSX drivers were released by Oracle about two months ago. Which version of InstantClient do you have? From where did you download it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM