我正在尝试在 Windows 中安装 python 的 cx_Oracle 模块。 我不断收到下面提到的错误:无法找到 Oracle 软件安装
我需要什么样的 Oracle 软件才能使 cx_Oracle 模块工作?
------------------------------------------------------------ ----------------------
C:\Users\ndhaka.ORADEV>pip install cx_Oracle
Downloading/unpacking cx-Oracle
Running setup.py (path:c:\users\ndhaka~1.ora\appdata\local\temp\pip_build_ndhaka\cx-Oracle\setup.py) egg_info for package cx-Oracle
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "c:\users\ndhaka~1.ora\appdata\local\temp\pip_build_ndhaka\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):
文件“”,第 17 行,位于
文件“c:\users\ndhaka~1.ora\appdata\local\temp\pip_build_ndhaka\cx-Oracle\setup.py”,第 135 行,位于
raise DistutilsSetupError("cannot locate an Oracle software " \
distutils.errors.DistutilsSetupError:无法找到 Oracle 软件安装
清理中... 命令 python setup.py Egg_info 在 c:\users\ndhaka~1.ora\appdata\local\temp\pip_build_ndhaka\cx-Oracle 中失败,错误代码为 1 将失败的调试日志存储在 C:\Users\ndhaka.ORADEV\pip\pip.log
最佳答案
您需要在计算机上安装 Oracle 客户端,因为 cx_Oracle 只是 Python 和 Oracle 客户端之间的桥梁。 我遇到了同样的问题,并通过从 here 安装即时客户端解决了我的问题 请确保您的系统安装兼容版本(32位或64位)
按照此链接中的所有步骤操作,您将在计算机中完美安装 cx_Oracle 模块。 link
关于python-2.7 - 在 Windows 上安装 cx_Oracle 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25802178/