1, installation Cx_oracle
1) Download Cx_oracle,https://pypi.python.org/pypi
2) Unzip the package
3) Execute Python setup.py install
Error after execution: Error:command ' gcc ' failed with exit status 1
Investigation:
1) Check whether the Oracle client software is installed
2) Check whether the relevant variables of ORACLE are configured in the current environment variable, such as Echo $ORACLE _home
3) If no configuration is required to configure the Oracle environment variable to the current user. Bash_profile, or/etc/profile
# Cat. Bash_profile
Export Oracle_base=/u01/app/oracle
Export Oracle_home= $ORACLE _base/product/10.2.0/db_1
Export Ora_crs_home= $ORACLE _base/product/10.2.0/crs_1
Export oracle_sid=icpdb
Export Path=.:${path}: $HOME/bin: $ORACLE _home/bin: $ORA _crs_home/bin
Export Path=${path}:/usr/bin:/bin:/usr/bin/x11:/usr/local/bin
Export Oracle_term=xterm
Export tns_admin= $ORACLE _home/network/admin
Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data
Export Ld_library_path= $ORACLE _home/lib
Export Ld_library_path=${ld_library_path}: $ORACLE _home/oracm/lib
Export Ld_library_path=${ld_library_path}:/lib:/usr/lib:/usr/local/lib
Export Classpath= $ORACLE _home/jre
Export Classpath=${classpath}: $ORACLE _home/jlib
Export Classpath=${classpath}: $ORACLE _home/rdbms/jlib
Export Classpath=${classpath}: $ORACLE _home/network/jlib
Export Threads_flag=native
Export display=192.168.196.5:0.0
Export nls_lang= "American_america. ZHS16GBK "
Install cx_oracle times wrong: Error:command ' gcc ' failed with exit status 1