Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 796
Emmélie Rousseau Avatar asked Sep 05 '25 03:09

Emmélie Rousseau


2 Answers

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.

like image 86
Andreas Violaris Avatar answered Sep 07 '25 19:09

Andreas Violaris


you can install pip install oracledb

like image 38
Landry HABONIMANA Avatar answered Sep 07 '25 20:09

Landry HABONIMANA