django oracle setup抛出错误

时间:2014-12-10 08:15:13

标签: python django oracle

在使用oracle设置django时,oracle_home是强制性的,我在一个ip地址中安装了两台机器安装了Oracle,在其他IP地址设置django webapp时,我尝试安装时

pip install cx_Oracle

它抛出错误

 pip install cx_Oracle
Downloading/unpacking cx-Oracle
  Running setup.py egg_info for package cx-Oracle
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-root/cx-Oracle/setup.py", line 135, in <module>
        raise DistutilsSetupError("cannot locate an Oracle software " \
    distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-root/cx-Oracle/setup.py", line 135, in <module>

    raise DistutilsSetupError("cannot locate an Oracle software " \

distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation

是否必须在同一个方框中安装Oracle 或者我在这里错过了

1 个答案:

答案 0 :(得分:2)

尝试:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
pip install cx_oracle