Python 官方文档:入门教程 => 点击学习
问题背景:在本地机安装失败,但在服务器上安装成功; 环境对比:两个机器的python版本不一致; 报错如下: PS C:\Users\Administrator\Downloads\***\****> pip install cx_orac
问题背景:在本地机安装失败,但在服务器上安装成功;
环境对比:两个机器的python版本不一致;
PS C:\Users\Administrator\Downloads\***\****> pip 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]
C:\Users\Administrator\AppData\Local\Temp\pip-build-env-ln3m6cfk\overlay\Lib\site-packages\setuptools\config\expand.py:132: SetuptoolsWarning: File 'C:\\Users\\Administrator\\App
Data\\Local\\Temp\\pip-install-2wg9p419\\cx-oracle_98b8bf5eb5fa4484a6701af7d917a7e2\\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
[notice] A new release of pip is available: 23.1.2 -> 23.2.1
[notice] To update, run: Python.exe -m pip install --upgrade pip
PS C:\Users\Administrator\Downloads\bayonetProjectApi\bayonetProjectApi>
1、进入cx-Oracle · Pyshou 手动去下载whl依赖,发现没有自己的python对于的文件(原因:可能自己安装的版本过高,导致依赖文件没有,所以失败);
重新安装和服务器上一致的python版本(3.7.9);
再次执行:pip3 install cx_Oracle ;
【如未遇到则忽略此步骤】报错:WARNING: You are using pip version 20.1.1; however, version 23.2.1 is available.
You should consider upgrading via the 'd:\warfile\python\python.exe -m pip install --upgrade pip' command(解决办法,执行:python -m pip install -U --force-reinstall pip);
再次执行:pip3 install cx_Oracle;
成功;
来源地址:https://blog.csdn.net/qq_39689122/article/details/131889513
--结束END--
本文标题: python install install cx_Oracle失败问题解决
本文链接: https://www.lsjlt.com/news/402494.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0