python - pip 命令下的 cx_Oracle 在 python27 上失败

标签 python pip cx-oracle

版本:python2.7

尝试安装cx_oracle

Collecting cx_Oracle Using cached cx_Oracle-5.3.tar.gz Complete output from command python setup.py Traceback (most recent call last): File "", line 1, in File "C:\Users\Test\AppData\Local\Temp\pycharm-packaging\cx-Oracle\setup.py", line 190, in raise DistutilsSetupError(message) distutils.errors.DistutilsSetupError: cannot locate Oracle include files in C:\new_software\Oracle\instantclient_12_1 Command "python setup.py egg_info" failed with error code 1 in C:\Users\Test\AppData\Local\Temp\pycharm-packaging\cx-Oracle\

我已经安装了oracle客户端12_1并在Windows10上设置了Oracle Home和PATH变量。

python2.7 已安装,并且在 python27/scripts/ 中,我看到 pip.exe

当我尝试运行时出现以下错误:

C:\new_software\Python27\Scripts>pip install cx_Oracle failed to create process.

请求帮助。谢谢。

最佳答案

对于 cx_Oracle 5.x,您需要在计算机上安装即时客户端的 SDK 包才能进行构建。

但是,cx_Oracle 6.x 根本不需要该软件包。事实上,二进制轮子是可用的,所以你根本不需要编译任何东西!您可以使用以下命令安装此版本的第一个测试版:

pip install cx_Oracle --pre

您还可以从PyPI下载并安装预编译的二进制文件。 .

关于python - pip 命令下的 cx_Oracle 在 python27 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43521508/

相关文章:

python - 安装了 python 3 和 pip 3 但 pip -V 显示 19.2.3

python - 强制 genfromtxt 输出为无向量

python - 在 pandas DataFrame 内的列表上使用 numpy.where (或 numpy.select)

python - 我正在询问有关如何继续使用 python 填充 html 的建议

python - 命令 "python setup.py egg_info"在/tmp/pip-build-tu6ygqzj/mysql-python/中失败,错误代码为 1

Python csv_writer : Change the output format of a oracle date column

javascript - 如何在同一个应用程序上下载由 django 应用程序创建的 word 文档

python - 属性错误 : module 'collections' has no attribute 'MutableMapping'

python - 导入 cx_Oracle 和 kinterbasdb 返回错误

python - cx_Oracle 使用 CLOB 执行many