无法使用pip安装cx_Oracle

问题描述 投票:0回答:2

我目前正在使用最新版本的Python,并尝试通过命令pip install cx_Oracle安装

cx_Oracle

在我的第一次尝试中,我遇到了一个错误,指出:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools".

为了解决这个问题,我从 this 链接安装了 Microsoft C++ Build Tools,从 this 链接安装了 Visual C++ 17。

但是,在我第二次尝试时,我遇到了另一个错误:

Temp\pip-install-ocqmu9mg\cx-oracle_a585471535c345cea9e48a083457ccd7\odpi\src\dpiImpl.h(34): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory

我通过咨询thisthisthis帖子研究了这个问题,但他们都没有为我的问题提供解决方案。

python python-3.x pip cx-oracle
2个回答
4
投票

很好的努力。不幸的是,Python 3.11 的预编译二进制文件当前不可用。

要使用此版本,您可以等待它们的发布或正确配置您的系统以从源代码构建它们。

或者,您可以考虑降级到以前版本的 Python,但不建议这样做。


0
投票

你可以安装

pip install oracledb

© www.soinside.com 2019 - 2024. All rights reserved.