[Python] ERROR: Could not build wheels for cx_Oracle, which is required to install...

Discussão em 'Python' iniciado por Stack, Julho 21, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to install cx_Oracle in Redhat Linux and facing the below error. I have tried many ways, downgrading the python from 3.9 to 3.8, upgrading setuptools. Nothing has resolved it.

    Collecting cx_Oracle
    Using cached cx_Oracle-8.3.0.tar.gz (363 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: cx_Oracle
    Building wheel for cx_Oracle (pyproject.toml) ... error
    error: subprocess-exited-with-error

    × Building wheel for cx_Oracle (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [13 lines of output]
    running bdist_wheel
    running build
    running build_ext
    building 'cx_Oracle' extension
    creating build
    creating build/temp.linux-aarch64-cpython-38
    creating build/temp.linux-aarch64-cpython-38/odpi
    creating build/temp.linux-aarch64-cpython-38/odpi/src
    creating build/temp.linux-aarch64-cpython-38/src
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DCXO_BUILD_VERSION=8.3.0 -Iodpi/include -Iodpi/src -I/usr/include/python3.8 -c odpi/src/dpiConn.c -o build/temp.linux-aarch64-cpython-38/odpi/src/dpiConn.o
    /tmp/pip-build-env-zlrr4oab/overlay/lib/python3.8/site-packages/setuptools/config/expand.py:144: UserWarning: File '/tmp/pip-install-apbhk3ix/cx-oracle_0d4f0759bf0349f8bee939c5b9282345/README.md' cannot be found
    warnings.warn(f"File {path!r} cannot be found")
    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
    Failed to build cx_Oracle
    ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects


    What can I try next?

    Continue reading...

Compartilhe esta Página