Refer to this article for the first few steps: http://www.cs.utexas.edu/~mitra/csSpring2011/cs327/cx_mac.html
At the time of the sudo python setup.py build and install
Obviously Echo $ORACLE _home and so on these environment variables are set, but still can not find the ORACLE home error, the error is as follows:
userdemacbook-pro:cx_oracle-5.1.2 mac$ sudo python setup.py buildpassword:traceback (most recent call last): File " setup.py ", line, in <module> raise Distutilssetuperror (" cannot locate an Oracle software "distutils.errors . Distutilssetuperror:cannot Locate an Oracle software installationuserdemacbook-pro:cx_oracle-5.1.2 mac$ sudo echo $ Oracle_home/users/mac/oracle/instantclient_11_2
Follow the prompts to find the 132 line of the setup.py file, which is written
119 # Try to determine the Oracle home121 #userOracleHome = Os.environ.get ("Oracle_home") 122 useroraclehome= "/users/ma C/oracle/instantclient_11_2 "123 If Useroraclehome is not none:124 if not Checkoraclehome (useroraclehome): Messageformat = "Oracle Home (%s) does not refer to" 126 "9i, 10g or 11g installation." 127 raise Distutilssetuperror (Messageformat% useroraclehome) (else:129 for path in os.environ["path"]. Split (OS.PATHSEP): if Checkoraclehome (path): 131 break132 if Oraclehome is none:133 raise Distutilssetuperror ("Cannot locate an Oracle software" 134 "Installation")
Can not find the directory to play an exception, the program exits, I here in 122 rows to him this directory forced to write dead (to ensure that the directory does exist)
Then in the execution of the installation, the program passes smoothly.
Mac installation Cx_oracle appears cannot locate an Oracle software error resolution