找回密码
 会员注册
查看: 7|回复: 0

python常见错误-安装cx_Oracle失败

[复制链接]

8

主题

0

回帖

25

积分

新手上路

积分
25
发表于 2024-9-7 20:18:57 | 显示全部楼层 |阅读模式
C:\Users\hspcadmin>pip3installcx_OracleCollectingcx_Oracle Usingcachedcx_Oracle-8.3.0.tar.gz(363kB) Installingbuilddependencies...done Gettingrequirementstobuildwheel...done reparingmetadata(pyproject.toml)...doneBuildingwheelsforcollectedpackages:cx_Oracle Buildingwheelforcx_Oracle(pyproject.toml)...error error:subprocess-exited-with-error ×Buildingwheelforcx_Oracle(pyproject.toml)didnotrunsuccessfully. │exitcode:1 ╰─>[8linesofoutput]   :6eprecationWarning:pkg_resourcesisdeprecatedasanAPI.Seehttps://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'cannotbefound    return'\n'.join(   runningbdist_wheel   runningbuild   runningbuild_ext   building'cx_Oracle'extension   error:MicrosoftVisualC++14.0orgreaterisrequired.Getitwith"MicrosoftC++BuildTools":https://visualstudio.microsoft.com/visual-cpp-build-tools/   [endofoutput] note:Thiserrororiginatesfromasubprocess,andislikelynotaproblemwithpip. ERROR:Failedbuildingwheelforcx_OracleFailedtobuildcx_OracleERROR:Couldnotbuildwheelsforcx_Oracle,whichisrequiredtoinstallpyproject.toml-basedprojects经过各种搜索排查,发现  cx_Oracle支持最高python是3.10==,我下载的版本是python-3.12.3-amd64.exe。不支持。https://pypi.org/project/cx-Oracle/#files再见了python12==保证卸载干净,然后重新安装python10低版本。新手这里需要注意,可能卸载后,安装python10,cmd命令窗口找不到python或者pip命令。注意需要重新检查环境变量。保证是python10的路径和对应的pip。先看一下python10,执行cx_oracle的成功界面。(emmmm我就是反复卸载安装配置环境变量。。。折腾好几遍)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

QQ|手机版|心飞设计-版权所有:微度网络信息技术服务中心 ( 鲁ICP备17032091号-12 )|网站地图

GMT+8, 2025-1-11 05:57 , Processed in 0.965837 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表