python常见错误 -安装 cx_Oracle 失败


C:\Users\hspcadmin>pip3 install cx_Oracle
Collecting cx_Oracle
  Using cached cx_Oracle-8.3.0.tar.gz (363 kB)
  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
  ╰─> [8 lines of output]
      <string>:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      C:\Users\hspcadmin\AppData\Local\Temp\pip-build-env-wz1x8fcs\overlay\Lib\site-packages\setuptools\config\expand.py:133: SetuptoolsWarning: File 'C:\\Users\\hspcadmin\\AppData\\Local\\Temp\\pip-install-b815qnb9\\cx-oracle_5fdb6c3699b94b47b0d0aae7c80aa61a\\README.md' cannot be found
        return '\n'.join(
      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

经过各种搜索排查,发现  cx_Oracle 支持最高python是3.10 = = ,我下载的版本是python-3.12.3-amd64.exe。不支持。

https://pypi.org/project/cx-Oracle/#files

再见了 python 12 = =

保证卸载干净,然后重新安装python10低版本。新手这里需要注意,可能卸载后,安装python10,cmd命令窗口找不到python 或者pip命令。注意需要重新检查环境变量。保证是python10的路径和对应的pip。先看一下python10,执行cx_oracle的成功界面。(emmmm我就是反复卸载安装配置环境变量。。。折腾好几遍)

  • 15
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值