2

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.

Andreas Violaris
  • 2,465
  • 5
  • 13
  • 26

1 Answers1

2

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.

Andreas Violaris
  • 2,465
  • 5
  • 13
  • 26
  • 1
    Thanks a ton! Downgrade worked like a charm. I m not gonna use my app in production so using an older version of python isnt a problem. Thankss again! – Emmélie Rousseau Feb 07 '23 at 21:34
  • 1
    The other option is to upgrade to python-oracledb, which *does* have Python 3.11 binaries. – Anthony Tuininga Feb 07 '23 at 21:35
  • Thanks for your reply! I have some very old dbs, thats why i asked specifically for cx_oracle module, unless of course if you know any trick to have backward compatibility with the new module. That would be even better! – Emmélie Rousseau Feb 07 '23 at 21:53
  • python-oracledb thick mode is the same as cx_Oracle and can connect to the same databases. – Anthony Tuininga Feb 08 '23 at 15:28
  • Thanks again for your reply. I m sure you know much better than me what is true (since you work for Oracle :D ) but in this link https://oracle.github.io/python-oracledb/ what does it mean when it says: "Thick mode: Connects to Oracle Database 11.2, 12c, 18c, and 21c"? This is what led me to believe that it doesn't support older versions like 9c for example. – Emmélie Rousseau Feb 08 '23 at 21:43