Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install/use cx_Oracle in PyPy

I can't seem to find anything on Google or SO with information on getting cx_Oracle to work with PyPy. Can somebody please tell me if it's possible, and if so, how can I accomplish this?

like image 274
PhilBot Avatar asked Feb 10 '12 15:02

PhilBot


People also ask

Does cx_Oracle require Oracle client?

Using cx_Oracle requires Oracle Client libraries to be installed. These provide the necessary network connectivity allowing cx_Oracle to access an Oracle Database instance. Oracle Client versions 19, 18, 12 and 11.2 are supported.

What is import cx_Oracle in Python?

cx_Oracle is a Python extension module that enables access to Oracle Database. It conforms to the Python database API 2.0 specification with a considerable number of additions and a couple of exclusions. cx_Oracle 8.3 was tested with Python versions 3.6 through 3.10.

What is cx_Oracle used for?

cx_Oracle is a Python extension module that enables querying and updating of Oracle databases using a database API that is common to all database access modules. A number of extensions to the common database API have also been included in order to take advantage of some of the features available exclusively to Oracle.


2 Answers

PyPy actually has it's own cx_Oracle module, you need to compile it yourself though, which looks like:

./pypy/translator/goal/translate.py pypy/translator/goal/targetpypystandalone.py --withmod-oracle
like image 58
Alex Gaynor Avatar answered Oct 08 '22 22:10

Alex Gaynor


After many hours spent on investigating different solutions, I sorted out that only this one is stable enough: use cx_oracle_on_types: https://github.com/lameiro/cx_oracle_on_ctypes

like image 34
mnowotka Avatar answered Oct 09 '22 00:10

mnowotka