Search code examples
pythonpython-3.xpipcx-oracle

Unable to install cx_Oracle with pip


I am currently using the latest version of Python and attempting to install cx_Oracle through the command pip install cx_Oracle.

On my first attempt, I encountered an error that stated:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools".

To address this, I installed both Microsoft C++ Build Tools from this link and Visual C++ 17 from this link.

However, upon my second try, I encountered another error:

Temp\pip-install-ocqmu9mg\cx-oracle_a585471535c345cea9e48a083457ccd7\odpi\src\dpiImpl.h(34): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory

I researched this issue by consulting this, this and this post, but none of them provided a solution for my problem.


Solution

  • Nice effort. Unfortunately, pre-compiled binaries for Python 3.11 are not currently available.

    To utilize this version, you can either wait for their release or configure your system properly to build them from source.

    Alternatively, you could consider downgrading to a previous version of Python, although this is not recommended.