# python -m 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]
<string>:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
C:\Users\Administrator\AppData\Local\Temp\pip-build-env-jb_g39xc\overlay\Lib\site-packages\setuptools\config\expand.py:134: SetuptoolsWarning: File 'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-u3v1mhmi\\cx-oracle_552b461268374c8e84e109da373d4d00\\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
please give me any valid solution
You will either have to install the Microsoft Build tools in order to build cx_Oracle for yourself, or you can install python-oracledb instead. This is the replacement for cx_Oracle and can be installed via:
Take a look at the documentation for details on the upgrade.