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我就是反复卸载安装配置环境变量。。。折腾好几遍)

相关推荐

  1. python常见错误信息

    2024-05-10 08:42:08       42 阅读
  2. Python常见错误

    2024-05-10 08:42:08       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-10 08:42:08       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-10 08:42:08       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-10 08:42:08       87 阅读
  4. Python语言-面向对象

    2024-05-10 08:42:08       96 阅读

热门阅读

  1. Django3 个人开发笔记

    2024-05-10 08:42:08       22 阅读
  2. Linux Nano 编辑器

    2024-05-10 08:42:08       27 阅读
  3. 信息系统架构_2.信息系统架构分类

    2024-05-10 08:42:08       36 阅读
  4. vlan和vxlan的区别与联系,以及他们对应的设备

    2024-05-10 08:42:08       58 阅读
  5. python的zip函数

    2024-05-10 08:42:08       37 阅读