一、问题描述

windows系统在Anaconda prompt运行

pip install cx_Oracle

安装cx_Oracle库报错,python版本3.12.7,报错:

  • ERROR: Failed to build installable wheels for some pyproject.toml based projects (cx_Oracle)
  • ERROR: Failed building wheel for cx_Oracle
  • error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/
  • error: subprocess-exited-with-error
    在这里插入图片描述

二、原因

上面所有报错,其实关键是下面这条报错造成,是因为电脑缺少Microsoft Visual C++ 14.0 or greater 的编译器,下载并安装Microsoft Visual C++ Build Tools后即可解决问题。

error: Microsoft Visual C++ 14.0 or greater is required. Get it with
“Microsoft C++ Build Tools”:
https://visualstudio.microsoft.com/visual-cpp-build-tools/

三、解决方案

最简单方法下载一个社区版的visualstudio IDE,里面把C++编译器选上安装,VisualStudio免费社区版下载
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

Logo

火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。

更多推荐