我想用 Django 连接到 Oracle 数据库。它需要 cx_Oracle 模块。当我尝试安装 cx_Oracle 时,它要求在当前服务器上安装 Oracle。
[root@localhost cx_Oracle-5.2]# /opt/python2.7/bin/python setup.py install
Traceback (most recent call last):
File "setup.py", line 170, in <module>
raise DistutilsSetupError("cannot locate an Oracle software " \
distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
但实际上我不需要在这台服务器上安装 Oracle,我的 Oracle 服务器是远程的。我该如何解决这个问题?
最佳答案
您需要安装 Oracle Instant Client .
cx_Oracle 使用它与您的数据库建立连接。
关于python - 如何在当前服务器上没有安装 Oracle 的情况下连接 Django 中的远程 Oracle 数据库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34859591/