oracle / python-cx_Oracle

Python interface to Oracle Database now superseded by python-oracledb
https://oracle.github.io/python-cx_Oracle
Other
890 stars 361 forks source link

Python 3.11 Support #648

Closed OliverNickel closed 1 year ago

OliverNickel commented 1 year ago

When trying to install cx_Oracle with Python 3.11.1 the module tries to compile because of not supported version.

Building wheels for collected packages: cx_Oracle, wrapt
  Building wheel for cx_Oracle (pyproject.toml): started
  Building wheel for cx_Oracle (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Building wheel for cx_Oracle (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      /tmp/pip-build-env-fctgnoua/overlay/lib/python3.11/site-packages/setuptools/config/expand.py:144: UserWarning: File '/tmp/pip-install-q46opmyt/cx-oracle_5b358b492f984f8dbb44a1c7de032c6d/README.md' cannot be found
        warnings.warn(f"File {path!r} cannot be found")
      running bdist_wheel
      running build
      running build_ext
      building 'cx_Oracle' extension
      creating build
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/odpi
      creating build/temp.linux-x86_64-cpython-311/odpi/src
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCXO_BUILD_VERSION=8.3.0 -Iodpi/include -Iodpi/src -I/python3.11/include/python3.11 -c odpi/src/dpiConn.c -o build/temp.linux-x86_64-cpython-311/odpi/src/dpiConn.o
      error: command 'gcc' failed: No such file or directory
      [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
cjbj commented 1 year ago

The best thing is to upgrade to the new version, now called python-oracledb. It has 3.11 binaries.

cjbj commented 1 year ago

See https://levelup.gitconnected.com/open-source-python-thin-driver-for-oracle-database-e82aac7ecf5a

OliverNickel commented 1 year ago

@cjbj Thanks a lot for the quick reply and help on that!