首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Python :无法为cx_Oracle构建轮子,这是安装基于pyproject.toml的项目所必需的

Python :无法为cx_Oracle构建轮子,这是安装基于pyproject.toml的项目所必需的
EN

Stack Overflow用户
提问于 2022-05-19 09:20:40
回答 1查看 2.9K关注 0票数 1

我正在尝试安装cx_Oracle,我得到了这个错误,我已经安装了最新的setuptools和pip。有没有人有类似的问题,他们是如何解决的?

我有视觉工作室:请看图片

在这里输入图像描述

代码语言:javascript
运行
复制
Processing c:\....resources\cx_oracle-8.1.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: cx_Oracle
  Building wheel for cx_Oracle (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cx_Oracle (pyproject.toml) did not run successfully.
  ¦ exit code: 1
  ?-> [7 lines of output]
      C:\....\2\pip-build-env-806_5jc6\overlay\Lib\site-packages\setuptools\config\expand.py:144: UserWarning: File 'C:\\....\\2\\pip-install-r8jb3ohi\\cx-oracle_111cfa7e3d91425bb65e9a6baa89c82f\\README.md' cannot be found
        warnings.warn(f"File {path!r} cannot be found")
      running bdist_wheel
      running build
      running build_ext
      building 'cx_Oracle' extension
      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/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cx_Oracle
Failed to build cx_Oracle
ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects
EN

回答 1

Stack Overflow用户

发布于 2022-05-19 20:33:32

您显示的映像具有可再发行性,而不是Visual本身!如果要自己构建,则需要按照提供的链接安装。

但是,如果您使用pip,您应该能够下载并安装预构建的二进制文件--这要容易得多!要使用的命令是:

代码语言:javascript
运行
复制
python -m pip install cx_Oracle
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72301896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档